I have a production SharePoint 2010 server with multiple site collections and sometimes I would like to copy the content from the site collections into my development environment so that I can test my upcoming changes to various features against what the actual data should be. How can I copy this data from production back to my development environment.
I found my solution from this blog entry
Here are my modified basic steps:
- Go into SQL Server Management Studio and make a backup of the production content database.
- Take a backup of the development environment content database as well just in case things go awry.
- Detach and reattach the development content database so that it kills any active connections.
- Restore the production content database backup to the development environment.
- Make sure that any user security needed is recreated in development.
Open powershell and enter
Mount-SPContentDatabase "DBNameHere" -DatabaseServer "DBServerHere" -WebApplication "http://SiteName"