SharePoint Backups

October 1st, 2009 Published by Chris Schwab
This entry is part 4 of 5 in the series SharePoint Tidbits from the Trenches

Call me captain obvious – but the fact of it is that since we’re a SharePoint hosting company, our engineers work extensively with SharePoint backups. We receive requests from customers moving their sites to our hosted SharePoint environments, or customers requiring a local copy of their business-critical information that we’re hosting for them. There are multiple third-party tools out there that will execute SharePoint backups for you, but there are also several fully functional options built right into SharePoint that can be leveraged to ensure the safety of your data.

Creating a SharePoint backup using the content DB

*** You’ll need admin access to both SharePoint Central Administration and the Microsoft SQL Server hosting the database itself in order to perform a backup using SharePoint Content DBs.

The SharePoint content database is just a SQL database that contains site collections as defined in Central Admin. Since it is just a SQL database, you can use SQL to backup/restore/move it just like you would any other DB. Here’s how:

  • Perform a SQL Restore
    • Once the database has been restored, you must go into Central Admin and detach/re-attach the database.
  • NOTE: This method backs up all the site collections. Anything that is not a root site collection will still contain the URL bound to the original site. Keep in mind that this could be an issue for you if you plan to restore the content to a test server.

Creating a SharePoint backup using STSADM Backup

*** You are going to need to have access to the command prompt on the local server and admin rights to the content database to run this.

This SharePoint backup will contain all content limited to a single site collection. This is a very nice option if you already understand how and where the URLs are stored for a given site collection or web application.

In a nutshell, an STSADM backup has no predefined URLs. This means you can take the data, set up a test SharePoint site with an entirely new address, and then restore all content into that new URL. This method also allows you to script your SharePoint backups so they occur on a regular basis.

Learn more about backing up SharePoint sites using STSADM Backup

Using the STSADM Export Operation to perform a site backup

*** You need to have access to the command prompt on the local server, admin rights to the content database, and be a site collection administrator to run this.

The export operation within STSADM can be used to get similar results as the STSADM backup. The export operation also has the ability to target your backups to a certain section of the site. Instead of taking the site collection as a whole, this option dives into a hosted SharePoint site, crawls the content and exports it. You can also strip user security (useful if attempting to switch account creation modes) and file versions.

Using STSADM export, you can also target it deeper than just the root site collection – allowing you to export only certain sub-sites that may contain vital information without the bulk of the entire SharePoint hosted site that is often cumbersome after a while.

Fair warning: at Fpweb.net, we have seen the export operation fail considerably if there is “something” it does not like about the structure of the site, customizations that have been installed on the server, or assemblies that may exist. It’s pretty clear to us when it fails – and on which section of the site it had an issue with. We prefer to use the STSADM Backup when possible in conjunction with Explorer View.

Learn more about backing up SharePoint sites using STSADM Export

Using Windows Explorer to view and backup your SharePoint site data

This SharePoint backup option is only available if you are using Internet Explorer or Mozilla FireFox with the IE Tab Plugin. Also, Windows integration must be enabled on your server, which it is by default.

To use this option – go to a SharePoint list such as shared documents, click actions > Open with Windows Explorer. You will most likely be prompted for credentials again. What you should get is a folder view of your hosted SharePoint site in Windows explorer. This will act just like a local file share, allowing you to drag and drop documents from one location to another. If you backup a couple folder levels, you can literally just copy one of the root folders and copy all documents to you local drive. This allows you to retain a copy of the documents as they exist in SharePoint. The benefit here is that you do not need to have SharePoint functional to open them. You can actually use this without IE by mapping a drive with Windows explorer to the URL of the list you want access too.

Our very own ‘UI Guru’ actually wrote about transferring files to SharePoint using network places or mapped drives back in January – check it out for a detailed step-by-step instruction on setting up mapped drives in Windows explorer for SharePoint. One last side note, if you are migrating from one hosted SharePoint site to another, this is a great way to copy documents from one location to another!

Learn more about using Windows Explorer for SharePoint backups

Last but not least…

There are two obvious exclusions from the list of ways you can backup a SharePoint site. SharePoint Designer and SharePoint Central Admin farm backups. Using SharePoint Designer 2007 for backup purposes, although possible, would warrant it’s own article. Honestly, SPD has problems backing up anything larger than 25 MB (which isn’t a lot when it comes to SharePoint Content DBs) but there are workarounds for that. There are plenty of entries out there that dive into designer backups. Check out the following links for starters:

I have excluded Farm backups from this post since our Engineers have had much more luck with STSADM’s reliability. You can do a few higher-level backups with the farm backup since it goes above the site level to back up the entire farm including all the different databases. This is nice in MOSS 2007 where you have a couple more databases that are nice to be able to restore (SSP, MySites, etc). However, getting that restore to actually work usually means you have done most of the work to get an STSADM site backup to restore anyway.

Thanks for reading, and stay tuned for more SharePoint Tidbits from the Trenches.


 
  1. No comments yet.
  1. No trackbacks yet.