Technology & Engineering November 10, 2014
Restoring a Tridion CMS Database in an Existing Environment
Every now and then, I need to restore SDL Tridion CM databases between environments, and each time I have to recall all of the steps involved. This time, I decided to share them with the world.
For this restore, I’m using SQL Server and SDL Tridion 2011 SP1 and will be restoring the Production CM database into the Development environment.
- First up, take a back up of the primary (in this case, Production) Tridion Content Manager database.
- Copy the backed up database to secondary (Development) environment.
- It is good practice to also backup the secondary environment database, so you can retrieve anything missing from the primary environment.
- Before beginning any database restoration, stop all Tridion services, in secondary environment including COM+, Tridion Windows services and IIS.
- Now you can restore the primary database on secondary database server, ensuring the database filenames are updated during the restore wizard to overwrite the existing databases. Otherwise, twice as much disk space will be used, and it will be confusing determining which database files have been orphaned.
- Note, you will still need to add the SQL Server user to the restored database with the correct access permissions.
- Check the dbo.Trustees table, ensuring the enabled users are correct and that the correct admin user and MTSUser are present.
- Another database level update required is to reset the dbo.Queue_Consumers table, setting all servers IS_ONLINE value to zero.
- Restart all the Tridion services in the secondary environment including COM+, Tridion Windows services and IIS.
- Next, I normally login to the secondary Tridion environment to check it loads OK.
- Run the included purge and re-index tools to clear out remaining queues and re-populate the Tridion search index.
- Now within Tridion, you will need to update the Publish Targets including:
1. Session Preview URL
2. Staging website URLs
3. Publish destination details
- Also within Tridion, you should update the SiteEdit Editor URL on the “Enable inline editing for Page” Template Building Block for each Page Template.
- Create new Broker (Content Delivery) and Session Preview databases for each environment; for ease, I remove the existing databases, and create new identical ones to avoid configuration changes in each website.
- Test publishing to each environment.
- Republish all websites.
- Test key functionality of websites to ensure the restore has been completed successfully.