Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've just taking over from a Sharepoint developer who has only worked in a single, live environment.

I want to set up a development environment (and subsequently also a UAT environment) and so to do this I need an exact (or near to exact as possible) clone of the live version, including all site collections, content and (ideally) permissions.

I have Googled and found that you can backup and restore single site collections using the Management Shell but to do each collection individually would be very time consuming.

Can anyone suggest a reliable way to do this?

share|improve this question
    
If it is an exact duplicate you can just take the content straight over. But if you are taking it to SharePoint online however you will need to migrate it. For ease I would suggest a migration tool like metavis, quest or axceler. Or if you have time and resource make your own. Of you have management shell access you can write a powershell script. –  Hugh Wood Dec 6 '12 at 16:01
add comment

2 Answers

up vote 2 down vote accepted

It is actually pretty simple.

  1. Make sure the dev farm is running at exactly the same patch level of SharePoint as production
  2. Create the new web application on the dev farm
  3. Copy the content database (MDB/LDB) from the production SQL server to the dev SQL server
  4. Detach the old content database from the dev web app (Remove-SPContentDatabase)
  5. Attach the copied database to the dev web app (Mount-SPContentDatabase)
  6. Restart IIS (this always seems to be needed to get SP to properly identify the root site collection in the newly attached DB)

You might want to make sure that outgoing email is disabled on the dev farm and Web App though. If it isn't, people will get Alerts and Workflow messages from the copy on Dev which is very confusing to users.

The good news is that once you have done this once, refreshing Dev with Production content is essentially a matter of repeating steps 3 and 6.

share|improve this answer
    
Thanks. Will vote up once I have reached the requisite 15 rep! –  Pandy Legend Dec 7 '12 at 7:40
add comment

You can take backup of Content Database and Restore complete database to replicate... This is the easiest method possible!

Restore content databases in SharePoint 2010

If you already have a Web Application ready in Dev or Test environment, then after restoring the database from Production you need to unmount the old database and mount the new one, can be easily done by powershell...

Attach or detach content databases (SharePoint Server 2010)

share|improve this answer
    
Thanks. Will vote up once I have reached the requisite 15 rep! –  Pandy Legend Dec 7 '12 at 7:39
    
OK so I have backed up my "live" content database and now coming to restore it. On step 3 (Select Restore Options) I selected "New Configuration" and it then asks me for Log File Location and New Directory name - what should these be? They default to F:\ and E:\ respectively but there isn't an F or E drive on the Sharepoint server. Should the "New directory name" be the directory of my new development site or can I just choose anything? –  Pandy Legend Dec 7 '12 at 8:23
    
But the article says select "Same Configuration" under Type of Configuration... Step 3 of 3: Select Restore Options page, in the Restore Options section, under Type of Restore, click the Same configuration option. A dialog box appears that asks you to confirm the operation. Click OK. –  Arsalan Adam Khatri Dec 7 '12 at 12:24
    
But it's not the same configuration. I am creating a new configuration. Same configuration would be if I was simply restoring a backup. –  Pandy Legend Dec 7 '12 at 12:39
1  
Use "Use SQL Server tools to restore a SharePoint content database" option, you will have to create an empty Database and restore on that database! Then skip the last step of restarting Timer Service, instead mount the database you restored to your web application as given in second link –  Arsalan Adam Khatri Dec 7 '12 at 13:19
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.