Sync Stalled at 6%
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?
Any ideas????
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.