Backing Up Sharepoint Sites

There are three ways of backing up Sharepoint sites, which one you use depends on which site/subsite you are backing up and what you intend to do with the backup.

  1. stsadm backup
  2. Sharepoint Designer backup
  3. stsadm export

1.  stsadm -o backup and stsadm -o restore

This can only be performed from the server itself and only allows you to backup from the top level site downwards, however, it allows you to essentially clone the site collection along with preserving all metadata, user rights.  Ideal for disaster recovery purposes.

To backup:
  1. On the server locate the file stsadm.exe (should be in \Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN), 

Tip:  Add the path to the stsadm.exe file into the environment variable path for the server, saves a whole lot of typing!

  2. From a command prompt, type [path to stsadm.exe\]stsadm -o backup -url http://%5Burl-of-the-web-site%5D -filename [path\filename.dat]

To restore: 
  1. Create a web application (but don’t create a site collection) 
  2. From a command prompt, type [path to stsadm.exe\]stsadm -o restore -filename [path\filename.dat] -url http://%5Burl-of-the-web-site%5D

2.  Sharepoint Designer Backup

This backup method is ideal for moving inidividual sites and subsites around within a site collection as well as migrating them from one server to another.  You only need administrative rights to the site/subsite rather than access to the actual server.  The main issue with a Designer backup is the loss of created/modified metadata along with Sharepoint Designer created custom data-view web-parts. Another major problem with Sharepoint Designer backups is the 25MB limit which makes Designer backups not a whole lot of use once the site is in use.

To backup:
  1. Open the site with SharePoint Designer
  2. Select Menu Site > Administration > Backup web site
  3. On the next screen, you can check the box to include subsites in the backup
  4. Unless your current website is low on disk space, leave the temporary location where it is and choose where to save the final .cmp file.

To restore:
  1. Open the site above where the restored site will be using Sharepoint Designer
  2. From the File menu go New > Website
  3. From the website templates, choose the Empty Web Site template
  4. In the ‘Specify the location of the new website’ box type the path to the new site.
  5. From the Site menu select Administration > Restore Website
  6. Select the .cmp file and click Open.

3. stsadm -o export and stsadm -o import

This type of backup has similar uses to the Sharepoint Designer backups (loss of some metadata and web-part data-views), however this method avoids the 25MB site limit.  The other smallish issue is you need access to the server.

To export a site:
1. On the server locate the file stsadm.exe (should be in \Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN), 
2. At a command prompt type [path to stsadm.exe\]stsadm -o export -url http://%5Burl-of-the-web-site/subsite%5D -filename [path\filename.dat]

If you include the -includesecurity switch, then the security settings and site owner information is retained, otherwise the site owner becomes whoever performs the import.

To import a site:
1. Create a web application and a site collection using sharepoint central administration if they don’t already exist. Or you can create a subsite in an existing site collection, either way use the “Blank site” template.

Caution: Watch out here for subsites you included in the export, you will need to create blank versions of those as well otherwise the import will fail.  Check the spelling of the url rather than the site name, they do need to be exactly the same.

2. At a Command prompt type stsadm -o import -url http://%5Burl-of-the-web-site/subsite%5D -filename [path\filename.dat]


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: