Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Copying production database to test server


We recently decided to copy our production databse to our test server, to get more accurate test data and also the content that was created in production.

We made a backup of CMS, commerce and our custom database.

In the cms database we change the host name in the tblHostDefinition table and SiteUrl in tblSiteDefinition table to correct url.
Then we delete some old content.

In the commerce database we scramle contacts and addresses, removing ordergroup with ecf_OrderGroup_Delete if they does not belong to the development team or customer.
We also delete aspnet_UsersInRoles, aspnet_Membership, aspnet_Profile and aspnet_Users if they does not belong to us, ApplicationLog older than 30 days and everyting in ecfVersion, ecfVersionAsset, ecfVersionCatalog, ecfVersionVariation and ecfVersionProperty.

After this we get really strange issues with the environment, For example 


This one will crash since all the data in ContentReference.StartPage will be empty (ID = 0, etc.. ). 

Or that we could not navigate to 5 of the 6 concept starting pages we have

First afer that I went into this in edit mode and made a new publish I could navigate to it.

I know this is not alot of information, but have anyone experienced the same issue or know what it could be?

Mar 22, 2019 7:58

what if you change site host definitions via admin ui? we have done similar movements with no issues

Mar 22, 2019 15:49

One better solution would be to export the content from production and import them to test. You can do the same with catalog export/import

Mar 22, 2019 16:47

We hade issues with changing the site host definitions via admin ui since the wildcard url did not work to save while if we removed it we had some other issues with the site that we think depended on that.

Our wildcard definition did not have culture saved to it, but after adding culture we could save it, and the site seem to work as excepted now (not sure if this was the solution since we only changed the wildcard definition in admin ui, but seem like it).

We also needed better data to our test database, so that is why we went this way. Still not sure if it was the best way, but as I said, I think it works now.


Mar 25, 2019 15:28
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.