+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Sync Stalled at 6%

Sync Stalled at 6%

3 posts, 1 answered
  1. James
    James avatar
    2 posts
    Registered:
    26 Sep 2012
    22 May 2013
    Link to this post
    We have successfully synchronized our QA-->Production environment several times.  Last week one of the admins started a sync that got to 6% and stalled.  I am going to copy the DB to the production manually this time, but is there a way to reset the sync?
  2. James
    James avatar
    2 posts
    Registered:
    26 Sep 2012
    24 May 2013 in reply to James
    Link to this post
    Any ideas????
  3. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    Registered:
    21 Nov 2016
    24 May 2013
    Link to this post
    Hello,

    Would it be possible for you to go to table sf_scheduled_tasks (for both database) and remove all tasks that you will see there (mark the row and delete it) if there are such rows? Furthermore, open the sf_site_sync_log_entry (for both databases) and delete the rows there. Then you need to recycle the application pools of the sites.

    After that you need to republish all items: Page Templates, Pages, News items, Events, Blog Posts, List items, Content Items, Images,  Documents, Taxonomies

    You could publish them by code.

    For example to publish all images use:

    LibrariesManager manager = LibrariesManager.GetManager();
                var images = manager.GetImages().Where(i => i.ApprovalWorkflowState == "Published" && i.Status == ContentLifecycleStatus.Master).ToList();
        
                foreach (var image in images)
                {
                        manager.Lifecycle.Publish(image);
                        
                }
                manager.SaveChanges();

    Place the code inside a web form and execute it in the browser. Make sure that you are logged in the backend before executing the code.

    To publish all documents:

    LibrariesManager manager = LibrariesManager.GetManager();
          var libraries = manager.GetDocumentLibraries();
        
          foreach (var library in libraries)
          {
              var documents = manager.GetDocuments().Where(d => d.Status == ContentLifecycleStatus.Master && d.Parent == library).ToList();
              foreach (var document in documents)
              {
                  manager.Lifecycle.Publish(document);
              }
          }
          manager.SaveChanges();

    To publish all pages:

    var pageManager = PageManager.GetManager();
       
    var getPage = pageManager.GetPageNodes().Where(p => p.ApprovalWorkflowState == "Published");
       
    foreach (var page in getPage)
    {
        var master = pageManager.PagesLifecycle.Edit(page.Page);
        pageManager.PagesLifecycle.Publish(master);
    }
       
    pageManager.SaveChanges();

    After you have republished all items start the synchronization process and inform us of your findings.

    Note that the synchronization is one way, you could synch from Staging to Production, but once you have synchronized from Staging to Production, you should not synch from Production to Staging, because you might encountered problems with the synchronization after that.

    We support only sync from A to B and the key set in A should be smaller than the number set on B. These special keys are introduced and described in our documentation.

    Please make sure that you entered administrators credentials in the first site and you are not logged in the second site.


    Regards,
    Stefani Tacheva
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
3 posts, 1 answered