Answered SharePoint 2010: Copy "Production" replica to "Test"

  • Tuesday, May 08, 2012 8:39 PM
     
     

    Hello,

    We have two SharePoint farms (both identical Hardware / Software SharePoint 2010 SP1 June/2011 CU). One is configured as our production environment and the other is to be our test environment. I am looking for the steps (or scripts) to preform a weekly update from Production to Test. Or at the very least, just the steps to preform this once.

    The servers in a farm are: 2 Web, 1 App, 2 DB, 1 Crawl, 1 Report

    I have tried Doing a backup from Production and Restoring just he sites we care about from Prod to Test and it worked but resulted in sites with no content.

    Any help would be really appreciated,

All Replies

  • Tuesday, May 08, 2012 11:07 PM
     
     Answered

    What type of backups were you performing? It doesn't sound right that the restored sites have no content.

    If it's just the content you are looking to synchronize (and not the configuration or Service data/configuration) site collection backups and restores should work. You could also automate a content database backup using Backup-SPFarm and Restore-SPFarm. This would be easier than the site collection backup and restore if you have several site collections in a single content database.

    If you wanted to get fancy you could do a SQL backup and restore, though I think this would require you to detach the content database in your test farm before restoring. I'm not 100% sure about that so you would have to test it out.

    Some other things to think about:

    • This is easiest if both farms are in the same domain. The migrated content would maintain security
    • As I mentioned, this approach doesn't replicate farm configuration or service configuration and data. Do not rely on this as a DR strategy (without further planning)

    Jason Warren
    Infrastructure Specialist

    • Marked As Answer by Shimin Huang Friday, May 18, 2012 9:50 AM
    •  
  • Thursday, May 10, 2012 12:44 PM
     
     Answered

    As Jason said Backup-SPFarm and Restore-SPFarm is most likely the easiest way to accomplish this.  There have been some random reports of lost data when restoring to a different farm though so it can be somewhat unreliable. 

    If you just want to copy your production data into your development site you could take your SQL backups from production and restore them into development.  The process for doing this would be:

    1. Use Dismount-SPContentDatabase to remove all of the content databases from all web applications.
    2. Use SQL Restore to restore production DB backups over development databases.
    3. Use Mount-SPContentDatabase to mount all of the content databases.

    More on Attaching/Detaching databsaes from production: http://technet.microsoft.com/en-us/library/ff628582.aspx.  Depending on how fully featured a development environment you want to have compared to your production you may need to add additional steps to this process to rebuild your user profile database in a similar manner but this is also a somewhat easy process.


    If this post was helpful please mark it as helpful, if it solved your problem please mark it as answered.
    Visit my Blog: http://matthewchurilla.blogspot.com/

    • Marked As Answer by Shimin Huang Friday, May 18, 2012 9:50 AM
    •