Wednesday, October 10, 2012

Backup and Restore SharePoint Sites using Power Shell:

Backup/Restore from one server to another or from one Site Collection to another (with PowerShell command)
In SharePoint 2010, PowerShell command Backup-SPSite is used for taking backup. you can get details of the command from the msdn link. The following command will backup the site collection ‘http://myserver’.
Backup Command: Restore-SPSite -Identity http://myserver -Path "c:\backup\file.bak"
Restore Command for new site: Restore-SPSite -Identity http://myserver -Path "c:\backup\file.bak"
Restore Command for existing site: Restore-SPSite -Identity http://myserver -Path "c:\backup\file.bak" -force