The conventional wisdom for moving a SharePoint site collection between farms is to backup the site collection using the stadm -o backup on the source server and then use stsadm -o restore on the destination server.
This approach is very neat and straight forward and works very well in most cases. The problem is with large site collections ( starting from a few GBs); with sizes in the GBs, this process might takes a very long time.
An alternative and much quicker way to backup and restore a site collection is using SQL Server backup and restore for the content database. SQL Server backup restore is way faster than stsadm backup/restore for large site collections.
Here are the steps needed:
- Identify the content database for the site collection. (in case you are not sure, check central administration->applications management-> content databases).
- From SQL server, backup this database and restore it to a new database.
- On the destination server, create a new site collection using the same template. As a result, a content database for the newly created site collection is created. ( note its name as we will delete it later from SQL server)
- On the destination server, go to central administration -> application management, content databases, Select the site collection and then select the existing database and remove it. Now the site collection has no content database.
- go to command line and use the command stsadm -o addcontentdb to attach the restored database to the site collection.
- Bingo ! ( in a fraction of the time needed for stsadm backup/restore)
Notes:
- You must first remove the existing content database before adding a new one. This is because it seems that SharePoint is looking for the top level site on that one and you must delete it first to force it to look for the top level site in the newly attached database.
- Trying to simply restore the database over the one just created by SharePoint with the creation of the new site collection will not work.
Assuming you have dba access to the content database or get your dba to help.
a. Create a job with two steps:
1. kill all processes connecting to the content database
2. restore the content database
b. Run the two steps job.
c. Restart IIS
The next time you need to restore the content database, simply over-write your previous backup file & run steps b & c.
This post is in reality the most poignant on this noteworthy topic. I concur with your viewpoints and will hungrily look forward to your forthcoming updates. Just saying thanks will not just be enough, for the phenomenal lucidity in your writing. I will at once grab your rss feed to stay in the loop of any updates. Fabulous work and good luck in your writing!
I tried the steps you mentioned but when I go to my new site I get 404 FILE NOT FOUND message.
Hi there, after reading this remarkable article i am also glad
to share my knowledge here with mates.