November Happy Hour will be moved to Thursday December 5th.

Copying production database to test server

Vote:
 

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 

ContentLoader.Service.Get<StartPage>(ContentReference.StartPage)

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?

#202293
Mar 22, 2019 7:58
Vote:
 

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

#202323
Mar 22, 2019 15:49
Vote:
 

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

#202325
Mar 22, 2019 16:47
Vote:
 

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.

Thanks

#202398
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.