Pages

Saturday, January 29, 2011

Backup/Restore sharepoint powershell/stsadm cmds

Backup the sharepoint site collection using below powershell command

backup-spsite -identity <url> -path <give the path>
Example:
backup-spsite -identity http://aurramu.blogspot.com/ -path D:\test.dat

Backup the sharepoint site collection using below stsadm command

stsadm.exe -o backup -url <url> -filename <give the path>
Example:
stsadm.exe -o backup -url http://aurramu.blogspot.com/ -filename D:\test.dat

Restore the sharepoint using the below powershell commands

restore-spsite -identity <url> -path <give the path>
Example:
restore-spsite -identity http://aurramu.blogspot.com/ -path D:\test.dat  -force
NOTE: if you want to overwrite existing site collection use -force

Restore the sharepoint using the below stsadm commands

stsadm.exe -o restore -url <url> -filename <give the path> -overwrite
Example:
stsadm.exe -o restore -url http://aurramu.blogspot.com/ -filename D:\test.dat -overwrite