Wednesday 7 May 2014

SharePoint Backup and restore a site collection

SharePoint Back up and restore a site collection:
stsadm -o backup -url http://SP2010/SIteColl -filename \\SP2010/SIteColl.bak -overwrite
stsadm -o restore -url http://SP2010/SIteColl -filename \\SP2010/SIteColl.bak –overwrite
How to run above commands
Open Command prompt
Run as Administrator
Go below path using CD
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN
Now type stsadm
Enter
You will see all commands
Now Use
stsadm -o backup -url http://SP2010/SIteColl -filename \\SP2010/SIteColl.bak -overwrite
stsadm -o restore -url http://SP2010/SIteColl -filename \SP2010/SIteColl.bak –overwrite
Or
Open SharePoint 2010 Management Shell
Now Use
stsadm -o backup -url http://SP2010/SIteColl -filename \\SP2010/SIteColl.bak -overwrite
stsadm -o restore -url http://SP2010/SIteColl -filename \\SP2010/SIteColl.bak –overwrite
You can restore using below command.
Go back to the SharePoint 2010 Management Shell
Run below command.
Restore-SPSite "http://SP2010/SIteColl " -Path C:\SP2010.bak -Force -Confirm:$False
Or
Restore-SPSite –Identity http://SP2010/SIteColl -Path C:\SP2010.bak –Force