Synchronizing the content

Once you configure content staging, the system tracks all changes made to documents 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.

Synchronizing content - all staging tasks

Documents tab

On the Documents tab, you can see logged changes made to documents. 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 documents of your website. By clicking individual documents, you can view only the changes made to the given document.

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 documents in the content tree.
  • Synchronize current document - synchronizes the currently selected document.
  • Synchronize current sub-tree - synchronizes all documents in the selected sub-tree.

The following types of tasks are logged for documents. You can see the type in the Task type column:

  • CREATEDOC - the document was created.
  • UPDATEDOC - the document was modified.
  • DELETEDOC - the document was deleted.
  • DELETEALLCULTURES - all cultural versions of the document were deleted.
  • PUBLISHDOC - the document was published.
  • ARCHIVEDOC - the document was archived.
  • REJECTDOC - the document was rejected.
  • MOVEDOC - the document was moved to another location in the content tree.

Synchronizing content - documents

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.

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:

  1. 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.
  2. 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.

Synchronizing content - objects