How to Guide: Backup SharePoint Site at the Command-Line
People new to SharePoint often ask how can they backup their SharePoint site. It is not as easy as a copy and paste keyboard stroke in windows explorer, but it isn't any harder than learning how to create your first web part.
There are two ways you can backup your SharePoint site, the first one is saving the site as a template; but the more efficient way to backup a SharePoint site is by using the STSADM.
Before using stsadm, make sure the command is run on the server where SharePoint is installed and that you are using admin rights to allow you to backup the site. Below is the command line syntax you need to execute for the backup process to start:
stsadm.exe -o backup -url
-filename [-overwrite]
- is the url of the SharePoint Site
-is the filename of your backuped SharePoint site.
[-overwrite] - this is optional and you might want to skip this one to ensure you are not overwriting any files. Also, it is best practice to use a filename with a version appended to it like -- mybackup1, mybackup2, mybackup3 and so on.
Example:
If the url of your site is http://sharepointportal/sites/myworkspace/default.aspx then the command line would be:
stsadm.exe -o backup -url http://sharepointportal/sites/myworkspace -filename mybackupfile -overwrite
You should get this message once everything went well -- Operation completed successfully.
BOOKMARK FOR REFERENCE
Leave a Comment
