SiteSync Stuck

Posted by Community Admin on 04-Aug-2018 18:16

SiteSync Stuck

All Replies

Posted by Community Admin on 09-Jul-2013 00:00

Hi,

I'm having some issues with SiteSync. I have 3 environments: Live, Staging, UAT.

We were having some issues with our staging server so have been doing changes on Live for the past few weeks. 

I've sync'd from Live to Staging, no problem, everything works as expected, however when I tried to sync from Staging back to UAT, it got to 40% and now won't do do anything. No errors, can't cancel etc...

I've tried restarting the module, disabled it, removed the server in syncing too and re-adding it... but every time I try to sync, it goes back to the same attached screen!

It's been like this for a few days!

Any advice? I'm on Sitefinity 5.4.

Thanks

Posted by Community Admin on 11-Jul-2013 00:00

Hey Gary I'm not sure you are aware but you can't sync 'back'...well you can try, but it screws everything up. We were told "The problem comes from the fact that you have synchoronized from A to B and from B to A (A-dev, B-stage). 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." 

These are the steps we were given to fix our sync issues. Though be aware you 'can't' sync backward. Your setup certainly is slightly different so change accordingly. We have 3 setups -- DEV (our 1st) --> STAGING (2nd) --> PRODUCTION (3rd). The steps below are for problems from DEV to STAGING. 

"In order to fix the problem, you need to republish all content items, pages and est. using the list above. After you republish them on the source server ( from the one you are trying to sync to the target server ) you will be able to perform the Site Sync process successfully.

Additionally, before start the synchronization again would it be possible for you to open your dev database and go to tablesf_scheduled_tasks, then remove the task that you will see there (mark the row and delete it)? The you need to recycle the application pool. 

Then you need to open the sf_site_sync_log_entry and delete the rows there. 

To sync follow the steps below:
1. Configure both sites on IIS
2. Login in to the dev site and in the synchronization settings add the staging site
3. Change the Site key to 1 for example
4. Login to the staging site and change the Site key to 2 for exampe (The keys that you are using on the sites should be different) 
5. Logout from the staging site
6. Go to the dev site and test the connection 
7. If everything is set up correctly you will see that the all connections are ok. 
8. Start the synchronization process (Choose Selected content, mark all and click sync now).

We recommend Selected content and choosing all content instead of All supported content types. This option (All supported content types) has been removed in Sitefinity 6.0.
I hope that my answer was informative enough, should you have any other inquires or problems, do not hesitate to contact me. "

Posted by Community Admin on 11-Jul-2013 00:00

Hi,

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.

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

Posted by Community Admin on 19-Jul-2013 00:00

Hi guys,

Thanks for getting back to me.

I don't actually have access to the database at the moment, but I'll try the suggested when I do.

I'll let you know how I get on once I'm in a position to try this out!

Thanks again,

Gary

Posted by Community Admin on 23-Jul-2013 00:00

Hello Gary,

I hope that the provided solution will help you resolve the problem. Looking forward to hearing from you.

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

Posted by Community Admin on 25-Aug-2015 00:00

Is there any effort being made towards enabling the Site Sync to be two-way? Many other CMSes offer robust 2-way sync tools, and this is one of the areas I feel Sitefinity is weak in. Enabling a good two-way sync story would go a long way towards solving one of the more time-consuming issues we have when using Sitefinity with client sites.

Posted by Community Admin on 26-Aug-2015 00:00

Hi,

Thank you for your feedback. I will forward it to our Sitefinity production team.

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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 05-Nov-2015 00:00

In the meantime what would you suggest is the best way to sync data back from production?

We have module builder modules for custom data collection that we would like to sync back to staging, then dev, etc... so that we can have the current data in all environments for testing and reporting on the collected data.

Could we program scheduled tasks that safely move data from production server back to other servers?  

Any ideas are greatly appreciated

Posted by Community Admin on 05-Nov-2015 00:00

The only "solution" (as bad as it is) that I am aware of is to copy the database down to local and then use something like the script earlier in this thread republish all of the content so the IDs are no longer the same.  Note, I have not tried this, and it is horribly manual-intensive.  

-----

This is a significant area Sitefinity could improve, and there is no GOOD workaround that we have found. I emailed support, and their answer was basically "WON'T FIX". Seeing as many other similar CMSes offer a two-way sync, it should be at least in the backlog as a to-do item, IMO.

 

This thread is closed