Friday, April 11, 2014

STSADM commands for SharePoint backup and restore

SharePoint STSADM Backup and Restore Commands

The following are examples of different STSADM commands you can use to back up and restore various components of your SharePoint environment.
A full farm backup followed by a restore:
stsadm -o backup -url http://app01/ -directory \\app01\sharepointbackups -BackupMethod Full -Quiet
stsadm -o restore -url http://app01/ -filename \\app01\sharepointbackups –Overwrite
Back up and restore configuration information only:
stsadm -o backup -url http://app01 -directory \\app01\sharepointbackups -configurationonly -quiet
stsadm -o restore -url http://app01 -filename \\app01\sharepointbackups -configurationonly –quiet
Back up and restore a service application:
stsadm -o backup -directory \\app01\sharepointbackups -quiet -backupmethod full -item "Excel Services"
stsadm -o restore -directory \\app01\sharepointbackups -item "Excel Services" –quiet
Back up and restore a site collection:
stsadm -o backup -url http://app01/portalsitecollection -filename \\app01\SharePointBackups\portalsitecollection.bak -overwrite
stsadm -o restore -url http://app01/portalsitecollection -filename \\app01\SharePointBackups\portalsitecollection.bak –overwrite
Export and import a subsite, list, or library:
stsadm -o export –url http://app01/sites/contosoportal/Shared%20documents –filename \\app01\sharepointbackups\SD.bak -quiet -overwrite
stsadm -o import –url http://app01/sites/contosoportal/Shared%20documents –filename \\app01\sharepointbackups\SD.bak -quiet

No comments:

Post a Comment