Thursday, October 10, 2013

SP Powershell command for Backup and Restore

site collection backup:
backup-spsite -identity http://gss-w7g-0793 -path \\GSS-W7G-0793\share\rootsite.bak

restore:
restore-spsite -identity http://gss-w7g-0793 -path \\GSS-W7G-0793\share\rootsite.bak



site backup
export-spweb -identity "http://gss-w7g-0793/Training Blank Site" -path \\GSS-W7G-0793\share\TrainingBlank.cmp -IncludeUserSecurity

restore
import-spweb -identity "http://gss-w7g-0793/Training Blank Site" -path \\GSS-W7G-0793\share\TrainingBlank.cmp  -IncludeUserSecurity


document library backup
export-spweb -identity http://gss-w7g-0793 -path \\GSS-W7G-0793\share\DocumentLib.cmp -itemurl /DC

document library restore
Import-SPWeb -Identity http://gss-w7g-0793 –Path \\GSS-W7G-0793\share\DocumentLib.cmp –UpdateVersions -Overwrite


list backup
Export-SPWeb -Identity http://gss-w7g-0793 -Path \\GSS-W7G-0793\share\listBackup.cmp -ItemUrl "/Lists/Calendar"

restore
Import-SPWeb http://site –Path export.cmp –UpdateVersions -Overwrite


document library backup
Export-SPWeb -Identity http://gss-w7g-0793 -Path C:\SP2010_Backups\testlibbkp2s.cmp -ItemUrl test -Force






No comments:

Post a Comment

HTML

Script:

JS