Showing posts with label Back and Restore. Show all posts
Showing posts with label Back and Restore. Show all posts

April 08, 2012

Move A Site From Moss 2007 To Sharepoint 2010

1) Find the content Database; These are listed under Central Admin->Application Management->Site Collection List
2) Backup the content database. Just doing a backup in SQL Server Management studio.
3) Restore content database to the new server, I mean the DB server for your SP2010
Copy the BAK file to new server. Create an empty DB in Management Studio, restore from backup, you may need to change an option in the "options" tab of the restore dialog to get it to work. (Overwrite db).
4) Create a new Web App on SharePoint 2010
5) Remove Content Database from the new web app.

Goto Central Admin->Application Management->Dataases->Manage Content Database ->Click on the database name -> Choose Remove content database and Click OK.
Now use STSADM to add restored DB to this web app
c:\program files\common files\microsoft shared\web server extentions\14\bin on new server is where you can find the STSADM.
run this command from there. Which will upgrade the content db to 2010?
stsadm -o addcontentdb -url http://yourwebapp:port -databasename yourcontentdb

6)The site has been Migrated,now the site should upgrade to 2010 from 2007.
Goto Siteaction ->Site settings->Site Administrator ->Visual Upgrade ->Update all sites .Now the site has been successfully migrated.
7) Run IISRESET  from command prompt

BackUp/Restore of a Sharepoint site Using PoweShell

1. On the Start menu, click All Programs.
2. Click Microsoft SharePoint 2010 Products.
3. Click SharePoint 2010 Management Shell.
4. At the Windows Power Shell command prompt type the following command:
Image1.gif

5. You will get a Power shell command prompt like below
Image2.gif

6. In SharePoint 2010, Power Shell command Backup-SPSite is used for taking backup

7. Please see the screen shot for the backup Power Shell command

8. Backup-SPSite -Identity http://ServerName:port -Path "
c:\backup\file.bak"

Image3.gif

9. If you want to overwrite a previously used backup file, use the Force parameter. You can use the NoSiteLock parameter to keep the read-only lock from being set on the site collection while it is being backed up. However, using this parameter can allow users to change the site collection while it is being backed up and might lead to possible data corruption during backup.

10. Once this done you will get the backup.

11. Next you have to create site collection then use the below command to restore the backup that we currently taken.

12. Restore-SPSite -Identity http://Servername:port -Path "c:\backup\file.bak" -force

Image4.gif

13. I am using force command because I want to overwrite the existing site collection that I created now.

Backup/Restore of a sharepoint site using stsadm

Backup means taking copy of a sharepoint site and restore means paste to another.

There are two ways of doing this or we can say that two set of commands.
  • Backup - Restore
  • Import - Export
Both ways are having their own advantage and disadvantages.

In this article I will show you Backup and restore command.
To achieve this we will use STSADM utility. This utility is present in the below mentioned path.
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN

1.gif
I have created two web application. One is with some customization and other is blank site.

Website 1: Site with some customization having address http://spdevserver:1002/default.aspx

2.gif
WebSite 2: Blank site having address http://spdevserver:1003/default.aspx

3.gif
Now we will take the backup from http://spdevserver:1002/default.aspx and restore it to http://spdevserver:1003/default.aspx

Steps to take site Backup:

Step 1: Open Command prompt and go to location as shown in the below screenshot.

4.gif
Step 2: Write the STSADM command for taking the site backup.

stsadm -o backup -url http://spdevserver:1002/ -filename C:\Backup.bak

5.gif
This command will save Backup.bak file in C:\

This file is the complete backup for http://spdevserver:1002/default.aspx

Now next step is to Restore this backup file to http://spdevserver:1003/default.aspx

To do this we need to write the STSADM command for Restore.

RESTORE COMMAND

stsadm -o restore -url http://spdevserver:1003/ -filename C:\Backup.bak -overwrite

6.gif
Now after completing this operation we are having http://spdevserver:1003/default.aspx site which is exactly the replica of http://spdevserver:1002/default.aspx site.

Just refresh the page and you will see it.

7.gif
In this way we can take a backup of sharepoint site and restore it to another sharepoint site.