Granular Backup and Restore in SharePoint 2010 (Part 2)

Written By: Arshad Ali -- 11/3/2010 -- join -- contribute -- (5229) comments -- printer friendly version

Rating: Rate --

Categories: Configurations, Infrastructure, SharePoint 2010, SharePoint Foundation 2010, System Administration

< Prev - 1 | 2 | - Next > | Become a paid author


In my last tip, Backup and Restore in SharePoint 2010, I talked about options to backup a SharePoint farm, web applications and different components and then restore them back whenever required. But what if I have a web application with multiple site collections in it and one of the them is only getting changed frequently hence I want to backup only a specific site collection instead of backing up the complete farm or web application on regular basis? What if I want to create a copy of the site collection to another SharePoint server? What new options are available in SharePoint 2010 for site collection backup and restore?


SharePoint 2010 not only allows you to backup and restore the farm/web application/services but also supports granular backup. For example you can take a backup of any specific site collection from Central Administration. You can export site content to the file system and import it into another site. And yes, now you don't need to setup another temporary farm to just restore a small part of your site content from the backup. You can simply restore a content database on any SQL Server instance and then use the unattached content database recovery feature from Central Administration to restore the selected contents.

This tip will discuss how to backup a SharePoint site collection from Central Administration as well as from PowerShell and the STSADM command as well as restoring it back using PowerShell or the STSADM command.

Backing-up a Site Collection from Central Administration

Go to:

START -> All Programs -> Microsoft SharePoint 2010 Products -> SharePoint 2010 Central Administration.

On the left side click on the Backup and Restore link as shown below, then in the detail pane click on Perform a site collection backup under Granular Backup as shown below. Please note Central Administration only allows you to take a backup of a site collection, you need to use PowerShell or the STSADM tool to restore it back when required (discussed next):

On the Site Collection Backup screen, specify the name of the site collection you want to take a backup of, the location to store the backup, the name of the backup file and the option to whether overwrite a file if it exists with the same name on the specified location. You can change the site collection selection by clicking on the Change Site Collection button:

On the Granular Backup Job Status screen, you can see the status of the site collection backup operation. This page gets refreshed automatically in every 30 seconds though you can refresh it on-demand by clicking on the Refresh link as shown below (You need to make sure the SharePoint 2010 Timer windows service is running before making a site collection backup using Central Administration):

Backing-up and Restoring Site Collection using PowerShell cmdlets

Central Administration is not the only way to do site collection backup in SharePoint 2010. SharePoint 2010 provides several PowerShell cmdlets to perform these operations. In other words you can script these operations and schedule it with Windows Task Scheduler to make it run on scheduled basis. Let's explore these cmdlets in detail.

The Backup-SPSite command is used to backup a site collection whereas the Restore-SPSite command is used to restore a site collection. The general syntax of these commands are:

Backup-SPSite -Identity <url of the site collection to be backed up> -Path <location and name of the file to be created after backup> [-Force] [-Verbose]

Restore-SPSite -Identity <url of the site collection getting restored> -Path <location and name of the backed up file to restore from> [-Force] [-Verbose]

To launch SharePoint 2010 the PowerShell console, go to:

START -> All Programs -> Microsoft SharePoint 2010 Products -> SharePoint 2010 Management Shell and click on it.

To take the site collection backup we need to use the Backup-SPSite command and specify the location where the backup will be stored, and the URL of the site collection. The Force parameter is used to overwrite a file with same name (if it exists) during the backup and overwrite a site collection with same name (if it exists) during a restore operation:

Backup-SPSite -Identity http://mktaraliw2k8r2:8081 -Path \\MKTARALIW2K8R2\SharePointBackupFolder\PrimarySiteCollection.bak -Force

Restore-SPSite -Identity http://mktaraliw2k8r2:8081 -Path \\MKTARALIW2K8R2\SharePointBackupFolder\PrimarySiteCollection.bak -Force

< Prev - 1 | 2 | - Next >

Learn more about SharePoint

Sponsor Information

Copyright (c) 2010-2017 Edgewood Solutions, LLC All rights reserved
privacy | disclaimer | copyright | advertise | contribute | feedback | about
Some names and products listed are the registered trademarks of their respective owners. |