Synchronizing the content
Once you configure content staging, the system tracks all changes made to pages and objects. You can view the synchronization tasks representing the changes in the Staging application.
Before you synchronize content between two servers, we recommend setting the same Code name for the source and target sites. To change the value, open the Sites application and Edit () the appropriate sites.
The interface for viewing changes and performing synchronization is divided into the following tabs:
All tasks tab
On the All tasks tab, you can see a list of all content staging tasks, i.e. all changes made to the system that can be synchronized on the target server.
Using the Server drop-down, you can choose the target server that you want to synchronize. By choosing (all), you perform synchronization for all available target servers. Then you can perform one of the following actions using the buttons at the bottom:
- Synchronize selected - performs synchronization for all selected tasks on the target server.
- Synchronize all - performs synchronization for all listed tasks on the target server. If you made any changes to content on the target server in the meantime, these changes will be overwritten.
- Delete selected - deletes all selected tasks for the target server.
- Delete all - deletes all listed tasks on the target server.
You can also perform the following actions separately with specific staging tasks:
- View - opens a new window with detailed information about the staging task.
- Synchronize - performs the synchronization task on the target server.
- Delete - deletes the synchronization task from the list.
Pages tab
On the Pages tab, you can see logged changes made to pages. By clicking the website root in the content tree on the left, you can view a list of all changes (synchronization tasks) made to all the pages of your website. By clicking individual pages, you can view only the changes made to the given page.
You can perform the same actions as on the All tasks tab, as described in the All tasks tab section.
You can also perform the following manual actions. These actions are manual because they are not related to the listed tasks and they can be performed even if there are no synchronization tasks logged:
- Run complete synchronization - performs complete synchronization of all pages in the content tree.
- Synchronize current page - synchronizes the currently selected page.
- Synchronize current sub-tree - synchronizes all pages in the selected sub-tree.
The following types of tasks are logged for pages. You can see the type in the Task type column:
- CREATEDOC - the page was created.
- UPDATEDOC - the page was modified.
- DELETEDOC - the page was deleted.
- DELETEALLCULTURES - all cultural versions of the page were deleted.
- PUBLISHDOC - the page was published.
- ARCHIVEDOC - the page was archived.
- REJECTDOC - the page was rejected.
- MOVEDOC - the page was moved to another location in the content tree.
Data tab
On the Data tab, you can see the logged changes for the data of custom tables.
You can perform the same actions as on the All tasks tab, as described in the All tasks tab section.
You can also perform the following manual actions. These actions are manual because they are not related to the listed tasks and they can be performed even if there are no synchronization tasks logged:
- Run complete synchronization - performs complete synchronization of all data in all custom tables.
- Synchronize current subtree - synchronizes all data in the selected custom table.
The following types of tasks are logged for custom tables data. You can see the type in the Task type column:
- CREATEOBJ - a new item was added to a table.
- UPDATEOBJ - an item in a table was updated.
- DELETEOBJ - an item in a table was deleted.
Staging tasks for custom table items are logged based on their ItemGUID columns. Changes made to items that do not have this column (typically custom tables imported from older versions of Kentico) are not logged.
You can edit custom tables in the Custom tables application. The application displays a warning message with a link that lets you generate GUIDs for custom tables.
Objects tab
On the Objects tab, you can view logged changes made to objects in the system.
The tree allows you to filter the tasks according to object types. The Website category contains object changes related to the currently selected site, and the Global objects category contains changes of global objects.
You can perform the same actions as on the All tasks tab, as described in the All tasks tab subsection.
When you select an object category, you can click Synchronize current subtree to synchronize all objects in the given category.
The system logs the following Task types for objects:
- CREATEOBJ - a new object was created.
- UPDATEOBJ - the object was modified.
- DELETEOBJ - the object was deleted.
- ADDTOSITE - the object was assigned to a site; applicable only to site-related objects.
- REMOVEFROMSITE - the object was removed from a site; applicable only to site-related objects.
The following types of tasks are logged for folders in media libraries:
- CREATEFOLDER - a folder was created.
- RENAMEFOLDER - the folder was renamed.
- COPYFOLDER - the folder was copied.
- MOVEFOLDER - the folder was moved.
- DELETEFOLDER - the folder was deleted.
Warning
When you stage an object, the synchronization also includes all child objects and bindings (relationships with other objects) in most cases. To avoid potential problems, we strongly recommend having mirrored content and consistent objects on all staging environments whenever possible.
For example: A role is not assigned to any users in the development environment, but to 100 users on the target production server. If you synchronize the role object through staging, the users are removed from the role on the target server.
Synchronizing global objects on instances with multiple sites
Changes made to global objects, such as page types, produce staging tasks for all staging servers on all sites. We recommend synchronizing such changes at the same time on all servers and sites to prevent overwriting of data (you may overwrite newer data by synchronizing old tasks later).
If you run a multi-site instance where you have full control over all sites, you can set up the following scenario:
- Define the same set of target servers for each site (in the Staging application):
- Each server must have an identical Code name across all sites.
- The Service URLs of each site’s servers must use the domain names of the matching site on the target instance.
- Add the <add key=“CMSStagingTreatServerNamesAsInstances” value=“true” /> key to the appSettings section of your application’s web.config file.
When you now synchronize a staging task representing a global object, the system automatically deletes the task from servers with the same code name on other sites. If you synchronize a global task for all servers, the task is removed completely on the remaining sites.