Tuesday, March 23, 2010

Backup & Restore MOSS SQL Server Method

Procedure to move a site from One FARM set up to a different FARM of SAME Configuration (Sharepoint Version)

1) I did a sitelock for the site you are going to back up.
This will ensure that content databases wont be updated as there is no option for users to add/edit the site.
stsadm –o setsitelock -lock readonly -url "http://corp-intranet:1200"

Gone to Central Administration and select the Application Management/Content databases

Selected the Application which has to be backed up. Clicked on the Content Database and Made the status as Offline (Ready/Offline). Clicked OK.

Gone to SQL Server Management Studio (Database Server) and took the back up as "Filename.bak"

Changed the Content Database Status to Ready once the back up is completed.

Set the site lock status to none after above steps are done.
stsadm –o setsitelock -lock none -url "http://corp-intranet:1200"


3) I restored the database back up "Filename.bak" database to the SQL instance for the new farm. (New database Server)

4) On the new farm, I opened SharePoint Central Administration.

5) On the Application Management tab, I created a new SharePoint Application. In doing so, I created a new web site that used the same port and host header the site on the original farm used.

6) When the application creation process completed, I did not run the Site Collection Creation Wizard.

7) Within SharePoint Central Administration Application Management tab, I clicked on Content Databases.

8) I verified the Web Application, then clicked on the content database (which is an empty content database created during the Web Application creation process)

9) On the Content Database Settings page, I changed the database status from Ready to Offline, clicked to select the option to Remove Content Database and clicked OK.

10) Back on the Manage Content Databases page, I verified the web application then clicked Add a content database.

11) On the Add Content Database page, I entered the name of my SQL server where I attached my restored database, as well as the database name. I verified Windows Authentication was selected, selected the appropriate Search Server, and clicked OK.

12) Once that process finished, I was returned to the Manage Content Databases tab and could see that the restored content database was now associated with the web application I had created minutes earlier.

13) I edited my local hosts file so the URL of my site would resolve to the local server

14) I opened a command prompt and ran an iisreset, then ran an ipconfig /flushdns, then pinged my site URL to verify it resolved to the local server.

15) I opened Internet Explorer and browsed to my site and voila! there it was!!

No comments: