0
votes

We are currently have a slight issue whereby the only way to keep sitecore content in Sync is by taking the staging data and synching with TDS manually and then committing it into source control so the content is not lost. As you can imagine that this is a very repetitive and lengthy process.

My question is there a way to automate this content synchronization on the environment from staging master database to TDS project or by another means? The end result we are hoping for is to have all the content changes made in staging in sync with source control automatically (if possible).

2

2 Answers

3
votes

Don't try to keep content in sync using TDS, you'll always face an uphill battle.

TDS should really only be used for developer controlled items - templates, rendering, layout, core db items etc, and maybe certain content items which are used as lookup/settings items. General content and media should not be kept in TDS unless it is for the purposes of setting up test content for developers. As a general rule of thumb, templates go up (local > dev > qa > prod) and content comes down (prod > qa > dev > local).

If you are trying to keep different server environments in sync then take a look at RAZL. It's possible to script the sync process to automate it as part of your continuous deployment process.

If it's just for the purposes getting content onto local developer machines then just create a one-off package and install it locally. As far as I know, it's not possible to automate the sync into TDS, and add to the fact that TFS is the probably not the best choice for Sitecore for this kind of thing anyway. If you really really want to go down this route then Git and Unicorn is a much better choice.

2
votes

I echo jammykam on not source-controlling content edits. Look at automation of SQL backups instead so you can have regular backups of data over time, and use workflow so that you have content versions.

To your question though, I do not know of a way to automate the TDS sync process. If you truly do want to ship all changes into source control, you will want to have a Sitecore event handler or a regular scheduled agent that is serializing the content and then checking it into TFS.

Typically, TDS is meant for local developers to be able to make changes in their local database that need to be part of the solution and share/deploy those changes via source control and automated deployments.