Business continuity management for Microsoft SharePoint Foundation 2010

  1. The Visual Studio assemblies for the Activities are stored in the global assembly catalog (GAC).
  2. The XML definition files (.ACTIONS files) are stored in the 14\TEMPLATE\{LCID}\Workflow directory.
  3. An XML entry to mark the activity as an authorized type is stored in the Web.config file for the Web applications in which it is used.

    If your farm workflows use custom actions, you should use a file backup system to protect these files and XML entries. Similar to SharePoint Foundation features such as Web parts and event receivers, these files should be reapplied to the farm as needed after recovery.

  • Workflows that depend on custom code, such as those that are created by using Visual Studio, are stored in two locations. The Visual Studio assemblies for the workflow are stored in the global assembly catalog (GAC), and the XML definition files are stored in the Features directory. This is the same as other types of SharePoint Foundation features such as Web parts and event receivers. If the workflow was installed as part of a solution package, backing up the content database protects these workflows.
  • If you create a custom workflow that interacts with a site collection other than the one where the workflow is deployed, you must back up both site collections to protect the workflow. This includes workflows that write to a history list or other custom list in another site collection. Performing a farm backup is sufficient to back up all site collections in the farm and all workflows that are associated with them.
  • Workflows that are not yet deployed must be backed up and restored separately like any other data file. When you are developing a new workflow but have not yet deployed it to the SharePoint Foundation farm, make sure that you back up the folder where you store your workflow project files by using Windows Backup or another file system backup application.

 

Protecting service applications

Service applications in a SharePoint Foundation environment can be made up of both service settings and one or more databases, or just service settings. You cannot restore a complete service application by restoring the database only; however, you can restore the databases for a service application and then reprovision the service application. For more information, see Restore a service application (SharePoint Foundation 2010).

 

Protecting SQL Server Reporting Services databases

SharePoint Foundation backup and recovery does not include SQL Server Reporting Services databases. You must use SQL Server tools. For more information, see Backup and Restore Operations for a Reporting Services Installation (http://go.microsoft.com/fwlink/?LinkId=186642).

  1. Back up or export the object from the unattached content database.
  2. Restore or import the output of the prior step into SharePoint Foundation 2010.

The following items can be backed up or exported from an unattached database by using granular backup and export, and then restored:

  • Site collection

    Back up by using site collection backup, and then recover by using a site collection restore.

  • Site

    Export, and then import.

  • Lists and libraries

    Export, and then import.

 

You can use import to recover content that you backed up from a database configured to use the SQL FILESTREAM RBS provider. The recovered content will be stored by SharePoint Foundation 2010 using the currently defined storage provider for that content database — that is, if the content database is not set to use RBS, the data will be stored in the content database; if the content database is set to use RBS, the data will be stored in RBS.

  • Related content

     

     

     

     

  • Plan for availability (SharePoint Foundation 2010)

    Updated: June 17, 2010

    This article describes key decisions in choosing availability strategies for a Microsoft SharePoint Foundation 2010 environment.

    As you carefully review your availability requirements, be aware that the higher the level of availability and the more systems that you protect, the more complex and costly your availability solution is likely to be.

    Not all solutions in an organization are likely to require the same level of availability. You can offer different levels of availability for different sites, different services, or different farms.

    In this article:

  • Availability overview

    Availability is the degree to which a SharePoint Foundation environment is perceived by users to be available. An available system is a system that is resilient — that is, incidents that affect service occur infrequently, and timely and effective action is taken when they do occur.

    Availability is part of business continuity management (BCM), and is related to backup and recovery and disaster recovery. For more information about these related processes, see Plan for backup and recovery (SharePoint Foundation 2010) and Plan for disaster recovery (SharePoint Foundation 2010).

     


    Note:

    When calculating availability, most organizations specifically exempt or add hours for planned maintenance activities.

     

    One of the most common measures of availability is percentage of uptime expressed as number of nines — that is, the percentage of time that a given system is active and working. For example, a system with a 99.999 uptime percentage is said to have five nines of availability.

     

     

    The following table correlates uptime percentage with calendar time equivalents.

     

    Acceptable uptime percentage

    Downtime per day

    Downtime per month

    Downtime per year

    95

    72.00 minutes

    36 hours

    18.26 days

    99 (two nines)

    14.40 minutes

    7 hours

    3.65 days

    99.9 (three nines)

    86.40 seconds

    43 minutes

    8.77 hours

    99.99 (four nines)

    8.64 seconds

    4 minutes

    52.60 minutes

    99.999 (five nines)

    0.86 seconds

    26 seconds

    5.26 minutes

     

    If you can make an educated guess about the number of total hours downtime you are likely to have per year, you can use the following formulas to calculate the uptime percentage for a year, a month, or a week:

    % uptime/year = 100 – (8760 – number of total hours downtime per year)/8760

    % uptime/month = 100 – ((24 × number of days in the month) – number of total hours downtime in that calendar month)/(24 × number of days in the month)

    % uptime/week = 100 – (168 – number of total hours downtime in that week)/168

     

    Costs of availability

    Availability is one of the more expensive requirements for a system. The higher the level of availability and the more systems that you protect, the more complex and costly an availability solution is likely to be. When you invest in availability, costs include the following:

    • Additional hardware and software, which can increase the complexity of interactions among software applications and settings.
    • Additional operational complexity.

     

    The costs of improving availability should be evaluated in conjunction with your business needs — not all solutions in an organization are likely to require the same level of availability. You can offer different levels of availability for different sites, different services, or different farms.

     

    Availability is a key area in which information technology (IT) groups offer service level agreements (SLAs) to set expectations with customer groups. Many IT organizations offer various SLAs that are associated with different chargeback levels.

     

     

     

    Determining availability requirements

    To gauge your organization’s tolerance of downtime for a site, service, or farm, answer the following questions:

    • If the site, service, or farm becomes unavailable, will employees be unable to perform their expected job responsibilities?
    • If the site, service, or farm becomes unavailable, will business and customer transactions be stopped, leading to loss of business and customers?

    If you answered yes to either of these questions, you should invest in an availability solution.

  • Choosing an availability strategy and level

    You can choose among many approaches to improve availability in a SharePoint Foundation environment, including the following:

    • Improve the fault tolerance of server hardware components.
    • Increase the redundancy of server roles within a farm.

     

    Hardware component fault tolerance

    Hardware component fault tolerance is the redundancy of hardware components and infrastructure systems such as power supplies at the server level. When planning for hardware component fault tolerance, consider the following:

    • Complete redundancy of every component within a server may be impossible or impractical. Use additional servers for additional redundancy.
    • Ensure that servers have multiple power supplies connected to different power sources for maximum redundancy.

    In any system, we recommend that you work with hardware vendors to obtain fault-tolerant hardware that is appropriate for the system, including redundant array of independent disks (RAID) arrays.

     

    Redundancy within a farm

    SharePoint Foundation 2010 supports running server roles on redundant computers (that is, scaling out) within a farm to increase capacity and to provide basic availability.

    The capacity that you require determines both the number of servers and the size of the servers in a farm. After you have met your base capacity requirements, you may want to add more servers to increase overall availability. The following illustration shows how you can provide redundancy for each server role.

     

     

     

     

     

    Availability within a server farm

     

     

     

     

     

    The following table describes the server roles in a SharePoint Foundation 2010 environment and the redundancy strategies that can be used for each within a farm.

     

    Server role

    Preferred redundancy strategy within a farm

    Front-end Web server

    Deploy multiple front-end Web servers within a farm, and use Network Load Balancing (NLB).

    Application server

    Deploy multiple application servers within a farm.

    Database server

    Deploy database servers by using clustering or high-availability database mirroring.

     

    Database availability strategies

    You can use Microsoft SQL Server failover clustering or SQL Server high-availability database mirroring to support availability of databases in a SharePoint Foundation environment.

     

    SQL Server failover clustering

    Failover clustering can provide availability support for an instance of SQL Server. A failover cluster is a combination of one or more nodes or servers, and two or more shared disks. A failover cluster instance appears as a single computer, but has functionality that provides failover from one node to another if the current node becomes unavailable. SharePoint Foundation can run on any combination of active and passive nodes in a cluster that is supported by SQL Server.

    SharePoint Foundation references the cluster as a whole; therefore, failover is automatic and seamless from the perspective of SharePoint Foundation.

    For detailed information about failover clustering, see Getting Started with SQL Server 2008 Failover Clustering (http://go.microsoft.com/fwlink/?LinkID=102837&clcid=0x409) and Configure availability by using SQL Server clustering (SharePoint Foundation 2010).

     

    SQL Server high-availability mirroring

    Database mirroring is a SQL Server technology that can deliver database redundancy on a per-database basis. In database mirroring, transactions are sent directly from a principal database and server to a mirror database and server when the transaction log buffer of the principal database is written to disk. This technique can keep the mirror database almost up to date with the principal database. SQL Server Enterprise Edition provides additional functionality that improves database mirroring performance.

    For mirroring within a SharePoint Foundation farm, you must use high-availability mirroring, also known as high-safety mode with automatic failover. High-availability database mirroring involves three server instances: a principal, a mirror, and a witness. The witness server enables SQL Server to automatically fail over from the principal server to the mirror server. Failover from the principal database to the mirror database typically takes several seconds.

    A change from previous versions is that SharePoint Foundation is mirroring-aware. After you have configured a database mirror instance of SQL Server, you then use SharePoint Central Administration or Windows PowerShell cmdlets to identify the failover (mirror) database server location for a configuration database, content database, or service application database. Setting a failover database location adds a parameter to the connection string that SharePoint Foundation uses to connect to SQL Server. In the event of a SQL Server time-out event, the following occurs:

  1. The witness server that is configured for SQL Server mirroring automatically swaps the roles of the primary and mirror databases.
  2. SharePoint Foundation automatically attempts to contact the server that is specified as the failover database.

For information about how to configure database mirroring, see Configure availability by using SQL Server database mirroring (SharePoint Foundation 2010).

For general information about database mirroring, see Database Mirroring (http://go.microsoft.com/fwlink/?LinkID=180597).

 


Note:

Databases that have been configured to use the SQL Server FILESTREAM remote BLOB store provider cannot be mirrored.

 

Comparison of database availability strategies for a single farm: SQL Server failover clustering vs. SQL Server high-availability mirroring

The following table compares failover clustering to synchronous SQL Server high-availability mirroring.


 

SQL Server failover clustering

SQL Server high-availability mirroring

Time to failover

Cluster member takes over immediately upon failure.

Mirror takes over immediately upon failure.

Transactional consistency?

Yes

Yes

Transactional concurrency?

Yes

Yes

Time to recovery

Shorter time to recovery (milliseconds)

Slightly longer time to recovery (milliseconds).

Steps required for failover?

Failure is automatically detected by database nodes; SharePoint Foundation 2010 references the cluster so that failover is seamless and automatic.

Failure is automatically detected by the database; SharePoint Foundation 2010 is aware of the mirror location, if it has been configured correctly, so that failover is automatic.

Protection against failed storage?

Does not protect against failed storage, because storage is shared between nodes in the cluster.

Protects against failed storage because both the principal and mirror database servers write to local disks.

Storage types supported

Shared storage (more expensive).

Can use less-expensive direct-attached storage (DAS).

Location requirements

Members of the cluster must be on the same subnet.

Principal, mirror, and witness servers must be on the same LAN (up to 1 millisecond latency roundtrip).

Recovery model

SQL Server full recovery model recommended. You can use the SQL Server simple recovery model, but the only available recovery point if the cluster is lost will be the last full backup.

Requires SQL Server full recovery model.

Performance overhead

Some decrease in performance may occur while a failover is occurring.

High-availability mirroring introduces transactional latency because it is synchronous. It also requires additional memory and processor overhead.

Operational burden

Set up and maintained at the server level.

The operational burden is larger than clustering. Must be set up and maintained for all databases. Reconfiguring after failover is manual.

 

Service application redundancy strategies

The redundancy strategy you follow for protecting service applications that run in a farm varies, depending on where the service application stores data.

 

Service applications that store data in databases

To help protect service applications that store data in databases, you must follow these steps:

  1. Install the service on multiple application servers to provide redundancy within the environment.
  1. Configure SQL Server clustering or mirroring to protect the data.

The following service applications store data in databases:

  • Business Data Connectivity service application
  • Application Registry service application

    We do not recommend mirroring the Application Registry database, because it is only used when upgrading Windows SharePoint Services 3.0 Business Data Catolog information to SharePoint Foundation 2010.

  • Usage and Health Data Collection service application


Note:

We recommend that you do not mirror the Usage and Health Data Collection service application Logging database.

  • Microsoft SharePoint Foundation Subscription Settings service
  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt, type the following command:

Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} [-Verbose]

Where <BackUpFolder> is the path of a folder on the local computer or the network in which you want to store the backups.


Note:

If you are backing up the farm for the first time, you must use the Full

option. You must perform a full backup before you can perform a differential backup.

For more information, see Backup-SPFarm (http://technet.microsoft.com/library/c37704b5-5361-4090-a84d-fcdd17bbe345(Office.14).aspx).

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  • Use Central Administration to back up a farm

    You can use Central Administration to back up the farm.

    To back up a farm by using Central Administration

  1. To perform this procedure, you must be a member of the Farm Administrators group on the computer that is running Central Administration.
  2. In Central Administration, on the Home page, in the Backup and Restore section, click Perform a backup.
  3. On the Perform a Backup — Step 1 of 2: Select Component to Back Up page, select the farm from the list of components, and then click Next.
  4. On the Start Backup — Step 2 of 2: Select Backup Options page, in the Backup Type section, select either Full or Differential.


Note:

If you are backing up the farm for the first time, you must use the Full option. You must perform a full backup before you can perform a differential backup.

  1. In the Back Up Only Configuration Settings section, click Back up content and configuration settings.
  2. In the Backup File Location section, type the UNC path of the backup folder, and then click Start Backup.
  3. You can view the general status of all backup jobs at the top of the Backup and Restore Status page in the Readiness section. You can view the status for the current backup job in the lower part of the page in the Backup section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Spbackup.log file at the UNC path that you specified in step 6.

  • Use SQL Server tools to back up a farm

    If you want to back up the complete farm, you must use either Windows PowerShell or Central Administration. You cannot back up the complete farm by using the SQL Server tools because you cannot use the tools to back up the farm’s configuration. However, you can back up all the databases that are associated with the farm.

     

    To back up the databases associated with a farm by using SQL Server tools

  1. To use SQL Server tools to back up SharePoint Foundation 2010 databases, the account that is used to back up the databases must be a member of the SQL Server db_backupoperator fixed database role on the database server where each database is stored.
  2. Open SQL Server Management Studio and connect to the database server.
  3. In Object Explorer, expand Databases.
  4. Right-click the database that you want to back up, point to Tasks, and then click Back Up.
  5. In the Back Up Database dialog box, in the Source area, select the kind of backup that you want to perform from the Backup type list. For more information about which backup type to use, see Overview of Recovery Models (http://go.microsoft.com/fwlink/?LinkId=114396).
  6. In the Backup component area, click Database.
  7. Either use the default name provided or specify a name for the backup set in the Name text box.
  8. Specify the expiration date for the backup set. This date determines how long, or when, the backup set can be overwritten by any later backups that have the same name. By default, the backup set is set to never expire (0 days).
  9. In the Destination area, specify where you want to store the backup.
  10. Click OK to back up the database.
  11. Repeat steps 1-10 for each farm database.
  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

Backup-SPConfigurationDatabase -Directory <BackupFolder> -DatabaseServer <DatabaseServerName> -DatabaseName <DatabaseName> -DatabaseCredentials <WindowsPowerShellCredentialObject> [-Verbose]

Where:

  • <BackupFolder> is the path to the folder with the correct backup files.
  • <DatabaseServerName> is the name of the database server for the farm that you are backing up.
  • <DatabaseName> is the name of the farm configuration database.
  • If you are not logged on with an account with db_backupoperator fixed database role on the database server where the configuration database is stored, you must specify the value for DatabaseCredentials

    parameter.

 

For more information, see Backup-SPConfigurationDatabase (http://technet.microsoft.com/library/28ddc176-1b7f-47dd-868f-39b7c403a900(Office.14).aspx).

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  • Use Central Administration to back up a farm configuration

    You can use Central Administration to back up the configuration of the farm that Central Administration is running on. To back up the configuration of a remote farm, you must use the Central Administration Web site that is running on the remote farm. You cannot use Central Administration to back up an unattached configuration database.

     

    To back up a farm configuration by using Central Administration

  1. Verify that the user account performing this procedure is a member of the Farm Administrators group.
  2. On the Central Administration Home page, in the Backup and Restore section, click Perform a backup.
  3. On the Perform a Backup — Step 1 of 2: Select Component to Back Up page, select the farm from the list of components, and then click Next.


Note:

You can back up the configuration for any service or application. However, common practice is to back up configuration at the farm level.

  1. On the Start Backup — Step 2 of 2: Select Backup Options page, in the Backup Type section, select Full.
  2. In the Backup Only Configuration Settings section, select the Backup only configuration settings option.
  3. In the Backup File Location section, type the Universal Naming Convention (UNC) path of the backup folder, and then click Start Backup.
  4. You can view the general status of all backup jobs at the top of the Backup and Restore Job Status page in the Readiness section. You can view the status for the current backup job in the lower part of the page in the Backup section. The status page updates every 30 seconds automatically. You can manually refresh the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Spbackup.log file at the UNC path that you specified in step 5.

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin. Additionally, the user account performing this procedure must be a member of the SQL Server db_backupoperator fixed database role on the database server where each database is stored.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} -Item <WebApplicationName> [-Verbose]

Where:

  • <BackupFolder> is the path of the folder you use for storing backup files.
  • <WebApplicationName> is the name of the Web application.


Note:

If you are backing up the Web application for the first time, you must use the Full

option. You must perform a full backup before you can perform a differential backup.

 

For more information, see Backup-SPFarm (http://technet.microsoft.com/library/c37704b5-5361-4090-a84d-fcdd17bbe345(Office.14).aspx).

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.
  2. In Central Administration, on the Home page, in the Backup and Restore section, click Perform a backup.
  3. On the Perform a Backup — Step 1 of 2: Select Component to Back Up page, select the Web application from the list of components, and then click Next.


Note:

The Web application might consist of several components. You must select the top-level component.

  1. On the Start Backup — Step 2 of 2: Select Backup Options page, in the Backup Type section, select either Full or Differential.


Note:

If you are backing up the Web application for the first time, you must use the Full option. You must perform a full backup before you can perform a differential backup.

  1. In the Back Up Only Configuration Settings section, click Back up content and configuration settings.
  2. In the Backup File Location section, type the Universal Naming Convention (UNC) path of the backup folder, and then click Start Backup.
  3. You can view the general status of all backup jobs at the top of the Backup and Restore Job Status page in the Readiness section. You can view the status for the current backup job in the lower part of the page in the Backup section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Spbackup.log file at the UNC path that you specified in step 6.

  1. Verify that the user account that is used to back up the databases is a member of the SQL Server db_backupoperator fixed database role on the database server where each database is stored. Additionally, verify that the user account has Full Control permissions on the backup folder.
  2. Open SQL Server Management Studio and connect to the database server.
  3. In Object Explorer, expand Databases.
  4. Right-click the database that you want to back up, point to Tasks, and then click Back Up.
  5. In the Back Up Database dialog box, in the Source area, select the kind of backup that you want to perform from the Backup type list. For more information about which backup type to use, see Overview of Recovery Models (http://go.microsoft.com/fwlink/?LinkId=114396).
  6. In the Backup component area, click Database.
  7. Either use the default name provided or specify a name for the backup set in the Name text box.
  8. Specify the expiration date for the backup set. This date determines how long, or when, the backup set can be overwritten by any later backups that have the same name. By default, the backup set is set to never expire (0 days).
  9. In the Destination area, specify where you want to store the backup.
  10. Click OK to back up the database.
  11. Repeat steps 1-10 for each database that is associated with the Web application.
  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt, type the following command:

    Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} -Item <ServiceApplicationName> [-Verbose]

     

    Where:

  • <BackupFolder> is the path of a folder on the local computer or on the network in which you want to store the backups.
  • <ServiceApplicationName> is the name of the service application that you want to back up.


Note:

To back up all the service applications, at the Windows PowerShell command prompt, type the following command:

Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} -Item “Farm\Shared Service Applications” [-Verbose]


Note:

If you are backing up the service application for the first time, you must use the Full

option. You must perform a full backup before you can perform a differential backup.

Some service applications always require a full backup. For these service applications, even if you select the Differential

option, the system performs a full backup.

 

For more information, see Backup-SPFarm (http://technet.microsoft.com/library/c37704b5-5361-4090-a84d-fcdd17bbe345(Office.14).aspx).

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

  • Use Central Administration to back up a service application

    You can use Central Administration to back up a service application.

     

    To back up a service application by using Central Administration

  1. Verify that the user account that performs this procedure is a member of the Farm Administrators group.
  2. In Central Administration, on the Home page, in the Backup and Restore section, click Perform a backup.
  3. On the Perform a Backup — Step 1 of 2: Select Component to Back Up page, select the service application from the list of components, and then click Next. To back up all the service applications, select the Shared Service Applications node.


Note:

The service application might consist of several components. You must select the top-level component.

  1. On the Start Backup — Step 2 of 2: Select Backup Options page, in the Backup Type section, select either Full or Differential.


Note:

If you are backing up the service application for the first time, you must use the Full option. You must perform a full backup before you can perform a differential backup.

Some service applications always require a full backup. For these service applications, the system performs a full backup even if you select the Differential option.

  1. In the Backup File Location section, in the Backup location box, type the path of the backup folder, and then click Start Backup.
  2. You can view the general status of all backup jobs at the top of the Backup and Restore Job Status page in the Readiness section. You can view the status for the current backup job in the lower part of the page in the Backup section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Spbackup.log file at the UNC path that you specified in step 5.

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt type the following command:

    Backup-SPSite -Identity <Site collection name> -Path <backup file> [-Force] [-NoSiteLock] [-UseSqlSnapshot] [-Verbose]

    If you want to overwrite a previously used backup file, use the Force

    parameter. You can use the NoSiteLock

    parameter to keep the read-only lock from being set on the site collection while it is being backed up. However, using this parameter can allow users to change the site collection while it is being backed up and might lead to possible data corruption during backup.

    If the database server is running an Enterprise Edition of Microsoft SQL Server, we recommend that you also use the UseSqlSnapshot

    parameter for more consistent backups. You can also export sites or lists from these snapshots.


Important:

When you perform a backup that uses the UseSqlSnapshot

parameter, a backup will be completed successfully. However, you will see an error similar to the following:

Backup-SPSite : Operation is not valid due to the current state of the object.

At line:1 char:14

+ Backup-SPSite <<<< http://site -Path + CategoryInfo : NotSpecified: (:) [Backup-SPSite], InvalidOperationException + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.SharePoint.PowerShell.SPCmdletBackupSite\\yourpath


Note:

If the RBS provider that you are using does not support snapshots, you cannot use snapshots for content deployment or backup. For example, the SQL FILESTREAM provider does not support snapshots.

For more information about using SQL snapshots, see Back up databases to snapshots (SharePoint Foundation 2010).

For more information, see Backup-SPSite (http://technet.microsoft.com/library/d4c31a1a-82a7-425f-b1bb-22e70bedd338(Office.14).aspx).


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  • Use Central Administration to back up a site collection

    You can use Central Administration to back up a site collection.

    To back up a site collection by using Central Administration

  1. Verify that the user account performing this procedure is a member of the Farm Administrators group. Additionally, verify that the Windows SharePoint Services Timer V4 service has Full Control permissions on the backup folder.
  2. In Central Administration, on the Home page, in the Backup and Restore section, click Perform a site collection backup.
  3. On the Site collection backup page, select the site collection from the Site Collection list.
  4. Type the local path of the backup file in the Filename box.


Note:

If you want to reuse a file, select the Overwrite existing file check box.

  1. Click Start Backup.
  2. You can view the general status of all backup jobs at the top of the Granular Backup Job Status page in the Readiness section. You can view the status for the current backup job in the lower part of the page in the Site Collection Backup section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

    If you receive any errors, you can review them in the Failure Message column of the Granular Backup Job Status page.

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.
  2. In Central Administration, on the Home page, in the Backup and Restore section, click Perform a backup.
  3. On the Perform a Backup — Step 1 of 2: Select Component to Back Up page, select Solutions, and then click Next.

    You can also select an individual solution, if you only want to back up a single solution.

  4. On the Start Backup — Step 2 of 2: Select Backup Options page, in the Backup Type section, select either Full or Differential.


Note:

If you are backing up the solution for the first time, you must use the Full option. You must perform a full backup before you can perform a differential backup.

  1. In the Backup File Location section, type the Universal Naming Convention (UNC) path of the backup folder, and then click Start Backup.
  2. You can view the general status of all backup jobs at the top of the Backup and Restore Job Status page in the Readiness section. You can view the status of the current backup job in the lower part of the page in the Backup section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

    If you receive any errors, review the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Spbackup.log file at the UNC path that you specified in step 4.

 

To back up trusted solutions by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt, type the following command to back up all of the solutions in the farm. To back up a single solution, add the name of the solution to the item path “farm\solutions”.

Backup-SPFarm -backupmethod full -directory <UNC location> -item “farm\solutions”

Where:

  • <UNC location> is UNC location of the directory that you want to back up to.

For more information, see Backup-SPFarm (http://technet.microsoft.com/library/c37704b5-5361-4090-a84d-fcdd17bbe345(Office.14).aspx).

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

 

Backing up sandboxed solutions

You cannot back up only sandboxed solutions. Instead, you must back up the farm, Web application, or content database with which the sandboxed solution is associated. For more information about these methods of backing up, see Related content.

  1. The Visual Studio 2010 assemblies for the actions are stored in the global assembly cache (GAC).
  2. The XML definition files (.ACTIONS files) are stored in the 14\TEMPLATE\<LCID>\Workflow directory.
  3. An XML entry to mark the action as an authorized type is stored in the Web.config file for the Web applications in which it is used.

    If the farm workflows use custom actions, you should use a file backup system to protect these files and XML entries. Similar to SharePoint Foundation features such as Web Parts and event receivers, these files should be reapplied to the farm as needed after recovery.

  • Workflows that depend on custom code, such as those that are created by using Visual Studio 2010, are stored in two locations. The Visual Studio 2010 assemblies for the workflow are stored in the GAC, and the XML definition files are stored in the Features directory. This is the same as other types of SharePoint Foundation features such as Web Parts and event receivers. If the workflow was installed as part of a solution package, backing up the farm, Web application, content database, or site collection protects these workflows.
  • If you create a custom workflow that interacts with a site collection other than the one where the workflow is deployed, you must back up both site collections to protect the workflow. This includes workflows that write to a history list or other custom list in another site collection. Performing a farm backup is sufficient to back up all site collections in the farm and all workflows that are associated with them.
  • Workflows that are not yet deployed must be backed up and restored separately. When you are developing a new workflow but have not yet deployed it to the SharePoint Foundation farm, make sure that you back up the folder where you store the workflow project files by a file system backup application.
  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

    Backup-SPFarm -Directory <Backup folder> -BackupMethod {Full | Differential} -Item <Content database name> [-Verbose]


Note:

If you are backing up the content database for the first time, you must use the Full

option. You must perform a full backup before you can perform a differential backup.

For more information, see Backup-SPFarm (http://technet.microsoft.com/library/c37704b5-5361-4090-a84d-fcdd17bbe345(Office.14).aspx)

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  • Use Central Administration to back up a content database

    You can use Central Administration to back up a content database.

    To back up a content database by using Central Administration

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.
  2. In Central Administration, on the Home page, in the Backup and Restore section, click Perform a backup.
  3. On the Perform a Backup — Step 1 of 2: Select Component to Back Up page, select the content database that you want to back up from the list of components, and then click Next.


Note:

Not all content databases can be selected in the list. If a database is not selectable, you must use Windows PowerShell to back up the content database.

  1. On the Start Backup — Step 2 of 2: Select Backup Options page, in the Backup Type section, select either Full or Differential.


Note:

If you are backing up the content database for the first time, you must use the Full option. You must perform a full backup before you can perform a differential backup.

  1. In the Backup File Location section, type the Universal Naming Convention (UNC) path of the backup folder, and then click Start Backup.
  2. You can view the general status of all backup jobs at the top of the Backup and Restore Job Status page in the Readiness section. You can view the status of the current backup job in the lower part of the page in the Backup section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

    If you receive any errors, review the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Spbackup.log file at the UNC path that you specified in step 4.

  • Use SQL Server tools to back up a content database

    You can use SQL Server tools to back up a content database.

     

    To back up a content database by using SQL Server tools

  1. Verify that the user account that is performing this procedure is a member of the SQL Server db_backupoperator fixed database role on the database server where each database is stored.
  2. Open SQL Server Management Studio and connect to the database server.
  3. In Object Explorer, expand Databases.
  4. Right-click the database that you want to back up, point to Tasks, and then click Back Up.
  5. In the Back Up Database dialog box, in the Source area, select the kind of backup that you want to perform from the Backup type list. For more information about which backup type to use, see Overview of Recovery Models (http://go.microsoft.com/fwlink/?LinkId=114396) in SQL Server Books Online.
  6. In the Backup component area, click Database.
  7. Either use the default name provided or specify a name for the backup set in the Name text box.
  8. Specify the expiration date for the backup set. This date determines how long, or when, the backup set can be overwritten by any later backups that have the same name. By default, the backup set is set to never expire (0 days).
  9. In the Destination area, specify where you want to store the backup.
  10. Click OK to back up the database.
  11. Repeat steps 1-9 for each content database that you want to back up.
  1. Verify that the account that is used to back up the databases is a member of the SQL Server db_owner fixed database role.
  2. Open SQL Server Management Studio and connect to the database server.
  3. In Object Explorer, expand Databases.
  4. Select the database that you want to back up, and then click New Query.
  5. Copy the following text, and then paste it to the query pane.

CREATE DATABASE <snapshot name>
ON
(
NAME=<logical name of the database file>,
FILENAME = ‘c:\WSS_Backup1.ss’)
AS SNAPSHOT OF <database name>;

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

    Export-SPWeb -Identity <Site URL> -Path <Path and file name> [-ItemUrl <URL of site, list, or library>] [-IncludeUserSecurity] [-IncludeVersions] [-NoFileCompression] [-GradualDelete] [-Verbose]

    If you are exporting a large site, list, or document library, you can use the GradualDelete

    parameter. When this parameter is used, the site collection is marked as deleted, which immediately prevents any further access to its content. The data in the deleted site collection is then deleted gradually over time by a timer job instead of all at once, which reduces its impact on the performance of farm servers and SQL Server.

    To specify which version of the site, list, or document library to include, use the IncludeVersions

    parameter and specify “LastMajor” (default), “CurrentVersion”, “LastMajorandMinor”, or “All”. To include the user security settings with the list or document library, use the IncludeUserSecurity

    parameter. If you want to overwrite the file that you specified, use the Force

    parameter. To view the progress of the backup operation, use the Verbose

    parameter.

    The NoFileCompression

    parameter lets you specify that no file compression is performed during the export process. Using this parameter can lower resource usage up to 30% during the export process. Using this parameter will result in a backup folder being created instead of a compressed file. If you use the NoFileCompression

    parameter in the Export-SPWeb

    command, you must also use it when you import the content by using the Import-SPWeb

    command.

For more information, see Export-SPWeb (http://technet.microsoft.com/library/cd85bf19-6f24-4f13-bd9c-37bbf279ea2b(Office.14).aspx)

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

  • Use Central Administration to export a site, list, or document library

    You can use Central Administration to export a site, list, or document library. You can only export one site, list, or document library at a time.

     

    To export a site, list, or document library by using Central Administration

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.
  2. In Central Administration, on the Home page, click Backup and Restore.
  3. On the Backup and Restore page, in the Granular Backup section, click Export a site or list.
  4. On the Site or List Export page, in the Site Collection section, select the site collection from the Site Collection list, and then select the site from the Site list.
  5. If you are exporting a site, skip this step, Select the list or document library from the List list.
  6. In the File Location section, in the Filename box, type the UNC path of the shared folder and the file to which you want to export the list or document library. The file name must use the .cmp extension.
  7. If the file already exists and you want to use this file, select the Overwrite existing files check box. Otherwise, specify a different file name.
  8. If you want to export all the security and permissions settings with the list or library, in the Export Full Security section, select the Export full security check box.
  9. If you want to specify which version of the list or library to export, select one of the following versions from the Export versions list:
  • All Versions
  • Last Major
  • Current Version
  • Last Major and Last Minor
  1. When you have specified the settings that you want, click Start Export.
  2. You can view the status of all backup jobs at the top of the Granular Backup Job Status page. You can view the status of the current backup job in the Content Export section of the page. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the <file name>.export.log file at the UNC path that you specified in step 6.

 

 

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt, type the following command:

    Merge-SPLogFile -Path “<path to merged log file>.log” -Overwrite

    For example, Merge-SPLogFile -Path “C:\Logs\MergedFiles\AllFarm_merged_12.20.2009.log” -Overwrite


Important:

Merging all log entries for all farm servers can take a long time and use resources. We recommend filtering the entries to match a specific set of criteria before merging.

To merge log entries that match a specific set of criteria, type the following command:

Merge-SPLogFile -Path “<path to merged log file>.log” -Area “<Area>” -Category “<Category>”

You can filter by one or more of the following:

  • Area (one or more, wildcard)
  • Category (one or more, wildcard)
  • Level
  • Correlation (one or more)
  • EventID (one or more, wildcard)
  • Message (wildcard)
  • StartTime
  • EndTime
  • Process (one or more, wildcard)
  • ThreadID (one or more)


Tip:

You can name the merged log file however you want. We recommend that you use a naming convention that makes it easy to determine what the log file contains, such as “<date merged>_<farm name>_<filtering criteria>. For example, to signify all the farm server log entries forSharePoint Foundation 2010 that involve the database category and are marked as “High” use, “Dec_2009_ContosoInternet_Foundation_Database_High.log”.

 

For more information, see Merge-SPLogFile (http://technet.microsoft.com/library/759702d7-bda2-4302-9345-abb43b609ad4(Office.14).aspx)

 

To archive diagnostic logs for a specific server by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt, type the following command:

    Copy-Item <Log folder path> -Destination <Archive folder path> -Recurse

For more information, type Get-Help Copy-Item -Full

.

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

 

 

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

    Add-SPShellAdmin -Username <User account> -Database <Database ID>

    To add a user account to all the databases in the farm, type the following command, and then press ENTER:

    ForEach ($db in Get-SPDatabase) {Add-SPShellAdmin -Username <User account> -Database $db}

    To remove a user account from all the databases in the farm, type the following command, and then press ENTER:

    ForEach ($db in Get-SPDatabase) {Remove-SPShellAdmin -Username <User account> -Database $db}

    To view the user accounts currently added to the databases in the farm, type the following command, and then press ENTER:

    ForEach ($db in Get-SPDatabase) {Get-SPShellAdmin -Database $db}

For more information, see Add-SPShellAdmin (http://technet.microsoft.com/library/2ddfad84-7ca8-409e-878b-d09cb35ed4aa(Office.14).aspx)

You might also have to grant additional permissions to the users running the backup or restore operation by using Windows PowerShell. The following table shows the permissions that are required.

 

Required permissions for Windows PowerShell

 

Farm component

Member of Administrators group on the local computer

Member of Farm Administrators SharePoint group

Full Control on backup folder

Farm

Yes

No

Yes

Content database

Yes

No

Yes

Site collection

No

Yes

Yes

Site, list, document library

Yes

No

Yes

 

 

 

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

    Add-SPShellAdmin -Username <User account> -Database <Database ID>

    To add a user account to all the databases in the farm, type the following command, and then press ENTER:

    ForEach ($db in Get-SPDatabase) {Add-SPShellAdmin -Username <User account> -Database $db}

    To remove a user account from all the databases in the farm, type the following command, and then press ENTER:

    ForEach ($db in Get-SPDatabase) {Remove-SPShellAdmin -Username <User account> -Database $db}

    To view the user accounts currently added to the databases in the farm, type the following command, and then press ENTER:

    ForEach ($db in Get-SPDatabase) {Get-SPShellAdmin -Database $db}

 

For more information, see Add-SPShellAdmin (http://technet.microsoft.com/library/2ddfad84-7ca8-409e-878b-d09cb35ed4aa(Office.14).aspx)

You might also have to grant additional permissions to the users running the backup or restore operation by using Windows PowerShell. The following table shows the permissions that are required.

 

Required permissions for Windows PowerShell

 

Farm component

Member of Administrators group on the local computer

Member of Farm Administrators SharePoint group

Full Control on backup folder

Farm

Yes

No

Yes

Service application

Yes

No

Yes

Content database

Yes

No

Yes

Site collection

No

Yes

Yes

Site, list, document library

Yes

No

Yes

 

 

 

  1. The change logs for all databases are retained when you restore a farm.
  2. The change log for content databases is retained when you reattach or restore a database.

    When a database ID and change log are retained, the search system continues crawling based on the regular schedule that is defined by crawl rules.

    When you restore an existing database and do not use the overwrite option, a new ID is assigned to the restored database, and the database change log is not preserved. The next crawl of the database will add data from the content database to the index.

    If a restore is performed and the ID in the backup package is already being used in the farm, a new ID is assigned to the restored database and a warning is added to the restore log. The ability to perform an incremental crawl instead of a full crawl depends on the content database ID being the same as before and the change log token that is used by the search system being valid for the current change log in the content database. If the change log is not preserved, the token is not valid and the search system has to perform a full crawl.

  • SharePoint Foundation 2010 backup backs up the Business Data Connectivity service external content type definitions but does not back up the data source itself. To protect the data, you should back up the data source when you back up the Business Data Connectivity service or the farm.

    If you restore the Business Data Connectivity service or the farm and then restore the data source to a different location, you must change the location information in the external content type definition. If you do not, the Business Data Connectivity service might be unable to locate the data source.

  • SharePoint Foundation 2010 restores remote Binary Large Objects (BLOB) stores only if you are using the FILESTREAM remote BLOB store provider to put data in remote BLOB stores.

    If you are using another provider, you must manually restore the remote BLOB stores.

  • If a user has taken copies of content for off-line editing in Microsoft SharePoint Workspace 2010 and the content is restored from a backup on the server, when the user re-connects, the server automatically synchronizes the off-line content with the restored content. This might result in data loss on the user’s copies of the content.
  • If you are sharing service applications across farms, be aware that trust certificates that have been exchanged are not included in farm backups. You must back up your certificate store separately or retain the certificates in a separate location. When you restore a farm that shares a service application, you must import and redeploy the certificates, and then re-establish any inter-farm trusts.

    For more information, see Exchange trust certificates between farms (SharePoint Foundation 2010) (http://technet.microsoft.com/library/679d334b-913d-49b3-b086-66a60093b261(Office.14).aspx)

  • After a Web application that is configured to use claims-based authentication has been restored, duplicate or additional claims providers are often visible. If duplicates appear, you must then manually save each Web application zone to remove them. For more information, see Restore a Web application (SharePoint Foundation 2010).
  • Additional steps are required when you restore a farm that contains a Web application that is configured to use forms-based authentication. For more information, see Restore a Web application (SharePoint Foundation 2010).
  • Use Windows PowerShell to restore a farm

    You can use Windows PowerShell to restore a farm.

    To restore a farm by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt, type the following command:

Restore-SPFarm -Directory <BackupFolder> -RestoreMethod Overwrite [-BackupId <GUID>]

Where:

  • <BackupFolder> is the path of the folder you use for storing backup files.
  • <GUID> is the identifier of the backup to restore from.


Note:

If you are not logged on as the Farm account, you are prompted for the Farm account’s credentials.

If you do not specify the BackupId

, the most recent backup will be used. To view the backups for the farm, type the following command:

Get-SPBackupHistory -Directory <BackupFolder> -ShowBackup [-Verbose]

Where:

  • <BackupFolder> is the path of the folder you use for storing backup files.

    You cannot use a configuration-only backup to restore content databases together with the configuration.

  1. To restart a service application, type the following command:

Start-SPServiceInstance -Identity <ServiceApplicationID>

Where:

For more information about restoring the farm by using Windows PowerShell, see Restore-SPFarm (http://technet.microsoft.com/library/8e18ea80-0830-4ffa-b6b6-ad18a5a7ab3e(Office.14).aspx)

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  • Use Central Administration to restore a farm

    You can use the Central Administration Web site to restore a farm.

     

    To restore a farm by using Central Administration

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.
  2. In Central Administration, on the Home page, in the Backup and Restore section, click Restore from a backup.
  3. On the Restore from Backup — Step 1 of 3: Select Backup to Restore page, from the list of backups, select the backup job that contains the farm backup, and then click Next. You can view more details about each backup by clicking the (+) next to the backup.


Note:

If the correct backup job does not appear, in the Backup Directory Location text box, type the Universal Naming Convention (UNC) path of the correct backup folder, and then click Refresh.

You cannot use a configuration-only backup to restore the farm.

  1. On the Restore from Backup  — Step 2 of 3: Select Component to Restore page, select the check box that is next to the farm, and then click Next.
  2. On the Restore from Backup — Step 3 of 3: Select Restore Options page, in the Restore Component section, ensure that Farm appears in the Restore the following component list.

    In the Restore Only Configuration Settings section, ensure that the Restore content and configuration settings option is selected.

    In the Restore Options section, under Type of Restore, select the Same configuration option. A dialog box will appear that asks you to confirm the operation. Click OK.


Note:

If the Restore Only Configuration Settings section does not appear, the backup that you selected is a configuration-only backup. You must select another backup.

Click Start Restore.

  1. You can view the general status of all recovery jobs at the top of the Backup and Restore Job Status page in the Readiness section. You can view the status for the current recovery job in the lower part of the page in the Restore section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the recovery to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Sprestore.log file at the UNC path that you specified in step 3.

  2. When the restore process has completed, you may need to restart one or more service applications. In Central Administration, on the Home page, in the Application Management section, click Manage services on server.
  3. On the Services on Server page, start any services related to service applications that you want to run by clicking Start in the Actions column next to the service application.
  4. Re-establish any trust relationships. For more information, see Exchange trust certificates between farms (SharePoint Foundation 2010) (http://technet.microsoft.com/library/679d334b-913d-49b3-b086-66a60093b261(Office.14).aspx).
  • Use SQL Server tools to restore a farm

    Although you cannot restore the complete farm by using SQL Server tools, you can restore most of the farm databases. If you restore the databases by using SQL Server tools, you must restore the farm configuration by using Central Administration or Windows PowerShell. For more information about how to restore the farm’s configuration settings, see Restore a farm configuration (SharePoint Foundation 2010).

     


    Note:

    The search index is not stored in SQL Server. If you use SQL Server tools to back up and restore search, you must perform a full crawl after you restore the content database.

     

    Before you restore SharePoint Foundation 2010, we recommend that you configure a recovery farm for site and item recovery.

    Restore the databases by following these steps:

  1. If possible, back up the live transaction log of the current database to protect any changes that were made after the last full backup.
  2. Restore the last full database backup.
  3. Restore the most recent differential database backup that occurred after the most recent full database backup.
  4. Restore all transaction log backups that occurred after the most recent full or differential database backup.

 

To restore a farm by using SQL Server tools

  1. Verify that the user account that is performing this procedure is a member of the sysadmin fixed server role.
  2. If the Windows SharePoint Services Timer service is running, stop the service and wait for several minutes for any currently running stored procedures to finish. Do not restart the service until after you restore all the databases that you have to restore.
  3. Start SQL Server Management Studio and connect to the database server.
  4. In Object Explorer, expand Databases.
  5. Right-click the database that you want to restore, point to Tasks, point to Restore, and then click Database.

    The database is automatically taken offline during the recovery operation and cannot be accessed by other processes.

  6. In the Restore Database dialog box, specify the destination and the source, and then select the backup set or sets that you want to restore.

    The default values for destination and source are appropriate for most recovery scenarios.

  7. In the Select a page pane, click Options.
  8. In the Restore options section, select only Overwrite the existing database. Unless your environment or policies require otherwise, do not select the other options in this section.
  9. In the Recovery state section:
  • If you have included all the transaction logs that you must restore, select RECOVER WITH RECOVERY.
  • If you must restore additional transaction logs, select RECOVER WITH NORECOVERY.
  • The third option, RECOVER WITH STANDBY is not used in this scenario.


Note:

For more information about these recovery options, see Restore Database (Options Page) (http://go.microsoft.com/fwlink/?LinkId=114420).

  1. Click OK to complete the recovery operation.
  2. Except for the configuration database, repeat steps 4 through 9 for each database that you are restoring.

 

 

  1. To restore the configuration settings, you must use the existing configuration database or manually create a new database and restore the configuration to that database. For more information about restoring the farm configuration, see Restore a farm configuration (SharePoint Foundation 2010).
  2. Start the Windows SharePoint Services Timer service.
  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. From the Windows PowerShell command prompt (that is, PS C:\>), type the following command and press ENTER:

    Restore-SPFarm -Directory <RestoreShare> -RestoreMethod Overwrite -ConfigurationOnly

    You must use the ConfigurationOnly

    parameter. To view the progress of the operation, use the Verbose

    parameter.

For more information, see Restore-SPFarm (http://technet.microsoft.com/library/8e18ea80-0830-4ffa-b6b6-ad18a5a7ab3e(Office.14).aspx)

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  • Use Central Administration to restore a farm’s configuration

    You can use Central Administration to restore a farm’s configuration.

    To restore a farm’s configuration by using Central Administration

  1. Ensure that you are a member of the Farm Administrators SharePoint group on the computer that is running Central Administration and a member of the sysadmin fixed server role on the database server where each database is stored.
  2. In Central Administration, on the Home page, in the Backup and Restore section, click Restore from a backup.
  3. On the Restore from Backup — Step 1 of 3: Select Backup to Restore page, select the backup job that contains the farm backup from the list of backups, and then click Next.


Note:

You can view additional information about the backups by expanding the row that contains the backup.


Note:

If the correct backup job does not appear, in the Backup Directory Location text box, enter the UNC path of the correct backup folder, and then click Refresh.

  1. On the Restore from Backup  — Step 2 of 3: Select Component to Restore page, select the check box that is next to the farm, and then click Next.
  2. On the Restore from Backup  — Step 3 of 3: Select Restore Options page, in the Restore Component section, ensure that “Farm” appears in the Restore the following content list.

    In the Restore Only Configuration Settings section, ensure that the Restore content and configuration settings option is selected.

    In the Restore Options section, select the Type of Restore option. Use the Same configuration setting. A dialog box will appear that asks you to confirm the operation. Click OK.


Note:

If the Restore Only Configuration Settings section does not appear, then the backup that you selected is a configuration-only backup.

Click Start Restore.

  1. You can view the general status of all recovery jobs at the top of the Backup and Restore Status page in the Readiness section. You can view the status of the current recovery job in the lower part of the page in the Restore section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the recovery to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Sprestore.log file at the UNC path that you specified in step 2.

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. Using Notepad, create a text file and then copy and paste the following script into the file. The commands in the example create XML files that document the configurations of the Web applications and service applications in the current farm. Choose only those commands that are relevant to your environment.

##
## Common SharePoint configuration settings
##
#Retrieve Web Application information. The default depth of 2 does not return much detail–we recommend that you use a depth of 4 for this cmdlet.
Get-SPWebApplication | Export-Clixml .\ WebAppFilename.xml -depth 4

#Retrieve custom layout information.
Get-SPWebApplication | Get-SPCustomLayoutsPage | Export-Clixml .\Get-SPCustomLayoutsPage.xml

#Determine how SharePoint designer access is configured
Get-SPWebApplication | Get-SPDesignerSettings | Export-Clixml .\Get-SPDesignerSettings.xml

#Retrieve information about alternate access mapping
Get-SPAlternateURL | Export-Clixml .\Get-SPAlternateURL.xml

#Retrieve information about content databases
Get-SPContentDatabase | Export-Clixml .\Get-SPContentDatabase.xml

#Retrieve database properties for each database
Get-SPDatabase | Export-Clixml .\Get-SPDatabase.xml

#Retrieve information about all SharePoint Products installed in the farm, and the versions of all updates installed for each product.
Get-SPProduct | Export-Clixml .\Get-SPProduct.xml

#Retrieve farm information
Get-SPFarm | Export-Clixml .\Get-SPFarm.xml
Get-SPFarmConfig | Export-Clixml .\Get-SPFarmConfig.xml

#Retrieve information about the servers in the farm
Get-SPServer | Export-Clixml .\Get-SPServer.xml

#Retrieve information about installed features
Get-SPFeature | Export-Clixml .\Get-SPFeature.xml

#Retrieve information about globally-installed site templates
Get-SPWebTemplate | Export-Clixml .\Get-SPWebTemplate.xml

#Retrieve information about deployed solutions
Get-SPSolution | Export-Clixml .\Get-SPSolution.xml

#Retrieve information about sandboxed solutions deployed in a site collection
Get-SPSite | Get-SPUserSolution | Export-Clixml .\Get-SPUserSolution.xml

#Retrieve information about installed Help
Get-SPHelpCollection | Export-Clixml .\Get-SPHelpCollection.xml

#Retrieve information about the logging levels that have been set
Get-SPLogLevel | Export-Clixml .\Get-SPLogLevel.xml

#Retrieve information about the sites in the farm
Get-SPSite | Export-Clixml .\Get-SPSite.xml
Get-SPSiteAdministration | Export-Clixml .\Get-SPSiteAdministration.xml
Get-SPSiteSubscription | Export-Clixml .\Get-SPSiteSubscription.xml

#Retrieve ULS logging information
Get-SPDiagnosticConfig | Export-Clixml .\Get-SPDiagnosticConfig.xml
Get-SPDiagnosticsPerformanceCounter | Export-Clixml .\Get-SPDiagnosticsPerformanceCounter.xml
Get-SPDiagnosticsProvider | Export-Clixml .\Get-SPDiagnosticsProvider.xml

#Retrieve information about accounts registered in the configuration database
Get-SPManagedAccount | Export-Clixml .\Get-SPManagedAccount.xml
Get-SPProcessAccount | Export-Clixml .\Get-SPProcessAccount.xml
Get-SPShellAdmin | Export-Clixml .\Get-SPShellAdmin.xml

#Retrieve information about the Mobile Messaging account.
Get-SPWebApplication | Get-SPMobileMessagingAccount | Export-Clixml .\Get-SPMobileMessagingAccount.xml

##
##Common service infrastructure settings
##
#Retrieve information about the service applications in the farm
Get-SPServiceApplication | Export-Clixml .\Get-SPServiceApplication.xml
Get-SPServiceApplicationPool | Export-Clixml .\Get-SPServiceApplicationPool.xml
Get-SPServiceApplicationProxy | Export-Clixml .\Get-SPServiceApplicationProxy.xml
Get-SPServiceApplicationProxyGroup | Export-Clixml .\Get-SPServiceApplicationProxyGroup.xml
Get-SPServiceApplication | Get-SPServiceApplicationEndpoint | Export-Clixml .\Get-SPServiceApplicationEndpoint.xml

#Retrieve information about the services running in the farm
Get-SPServiceInstance | Export-Clixml .\Get-SPServiceInstance.xml

#Retrieve information about common Web service settings
Get-SPServiceHostConfig | Export-Clixml .\Get-SPServiceHostConfig.xml

##
## Common service application configurations
##

#Application Discovery and Load Balancer Service Application
Get-SPTopologyServiceApplication | Export-Clixml .\Get-SPTopologyServiceApplication.xml
Get-SPTopologyServiceApplicationProxy | Export-Clixml .\Get-SPTopologyServiceApplicationProxy.xml

#Business Data Connectivity Service
#Retrieve information about data connection files. ###WARNING: The following cmdlet requires run as administrator rights
Get-SPDataConnectionFile | Export-Clixml .\Get-SPDataConnectionFile.xml
###WARNING: The following cmdlet requires run as administrator rights
Get-SPDataConnectionFile | Get-SPDataConnectionFileDependent | Export-Clixml .\Get-SPDataConnectionFileDependent.xml

#Security Token Service Application
#Retrieve information about the security token service used for incoming SOAP messages.
Get-SPSecurityTokenServiceConfig | Export-Clixml .\Get-SPSecurityTokenServiceConfig.xml

#Usage and Health data collection
#Retrieve information about the Usage and Health Data Collection service application.
Get-SPUsageApplication | Export-Clixml .\Get-SPUsageApplication.xml
Get-SPUsageDefinition | Export-Clixml .\Get-SPUsageDefinition.xml
Get-SPUsageService | Export-Clixml .\Get-SPUsageService.xml

###Note: These cmdlets are commented out because you are unlikely to want to run them. ###
#Get-SPSite | %{$web=Get-SPWeb $_.Url;$webid=$web.Id;$web | Get-SPUser | Export-Clixml .\Get-SPUser-$webid.xml}

# Get-SPSite | %{$web=Get-SPWeb $_.Url;$webid=$web.Id;$web | Export-Clixml .\Get-SPWeb-$webid.xml}

  1. To run the script, in the Windows PowerShell console, at the command prompt (that is, PS C:\>), type the following command and press ENTER:C:\<path>\<filename>.ps1

 

For more information, see Export-Clixml (http://technet.microsoft.com/en-us/library/dd347657.aspx) Get-SPWebApplication (http://technet.microsoft.com/library/11d6521f-f99c-433e-9ab5-7cf9e953457a(Office.14).aspx), Get-SPServiceApplication (http://technet.microsoft.com/library/71a467dc-3b95-4b65-af93-0d0d6ebb8326(Office.14).aspx).

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt, type the following command to document the current Web application URLs and content database mappings.

Get-SPWebApplication | %{$_.Name;$_.Url;%{$_.ContentDatabases|%{$_.Name};Write-Host “”}}

  1. Either dismount all content databases, as in the following example:

Get-SPContentDatabase | Dismount-SPContentDatabase

Or dismount a specific content database, as in the following example:

Get-SPContentDatabase WSS_Content | Dismount-SPContentDatabase

  1. Back up the farm.

Backup-SPFarm -Directory \\servername\share -BackupMethod Full


Note:

You can view the progress of the backup by looking at the \\servername\share\spbr####\spbackup.log file.

  1. After the backup is complete, re-mount the content databases. Replace <WSS_Content> and <http://servername&gt; with each of the mappings documented in step 5).

Mount-SPContentDatabase -Name <WSS_Content> -WebApplication <http://servername&gt;

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt, type the following command:

Restore-SPFarm -Directory <BackupFolderName> -RestoreMethod Overwrite -Item  <WebApplicationName> [-BackupId <GUID>] [-Verbose]

Where:

  • <BackupFolderName> is the full path to the folder you use for backup files.
  • <WebApplicationName> is the name of the Web application that was backed up.
  • <GUID> is the identifier of the back up to use for the restore operation.

    If you do not specify the value of the BackupID

    parameter, the most recent backup will be used. You cannot restore a Web application by using a configuration-only backup. You can view the backups for the farm by typing the following:

Get-SPBackupHistory -Directory <BackupFolderName> -ShowBackup

For more information, see Restore-SPFarm (http://technet.microsoft.com/library/8e18ea80-0830-4ffa-b6b6-ad18a5a7ab3e(Office.14).aspx).

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  1. Verify that the user account performing this procedure is a member of the Farm Administrators group. Additionally, verify that the Windows SharePoint Services Timer V4 service and the Farm Database Access account have Full Control permissions on the backup folder.
  2. In Central Administration, on the Home page, in the Backup and Restore section, click Restore from a backup.
  3. On the Restore from Backup — Step 1 of 3: Select Backup to Restore page, from the list of backups, select the backup job that contains the farm or Web application backup, and then click Next. You can view more details about each backup by clicking the (+) next to the backup.


Note:

If the correct backup job does not appear, in the Current Directory Location text box, type the Universal Naming Convention (UNC) path of the correct backup folder, and then click Refresh.

You cannot use a configuration-only backup to restore the Web application.

  1. On the Restore from Backup — Step 2 of 3: Select Component to Restore page, select the check box that is next to the Web application, and then click Next.
  2. On the Restore from Backup — Step 3 of 3: Select Restore Options page, in the Restore Component section, make sure that Farm\<Web application> appears in the Restore the following content list.

    In the Restore Only Configuration Settings section, make sure that the Restore content and configuration settings option is selected.

    In the Restore Options section, under Type of Restore, select the Same configuration option. A dialog box appears that asks you to confirm the operation. Click OK.


Note:

If the Restore Only Configuration Settings section does not appear, the backup that you selected is a configuration-only backup. You must select another backup.

Click Start Restore.

  1. You can view the general status of all recovery jobs at the top of the Backup and Restore Job Status page in the Readiness section. You can view the status for the current recovery job in the lower part of the page in the Restore section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the recovery to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Sprestore.log file at the UNC path that you specified.

  • Use SQL Server tools to restore databases associated with a Web application

    You cannot restore the complete Web application by using SQL Server tools. However, you can restore all the databases that are associated with the Web application. To restore the complete Web application, use either Windows PowerShell or Central Administration.

    To restore databases associated with a Web application by using SQL Server tools

  1. Verify that the user account performing this procedure is a member of the sysadmin fixed server role.
  2. If the Windows SharePoint Services Timer service is running, stop the service and wait for several minutes for any currently running stored procedures to finish. Do not restart the service until after you restore the databases.
  3. Start SQL Server Management Studio and connect to the database server.
  4. In Object Explorer, expand Databases.
  5. Right-click the database that you want to restore, point to Tasks, point to Restore, and then click Database.

    The database is automatically taken offline during the recovery operation and cannot be accessed by other processes.

  6. In the Restore Database dialog box, specify the destination and the source, and then select the backup set or sets that you want to restore.

    The default values for destination and source are appropriate for most recovery scenarios.

  7. In the Select a page pane, click Options.
  8. In the Restore options section, select only Overwrite the existing database. Unless the environment or policies require otherwise, do not select the other options in this section.
  9. In the Recovery state section:
  • If you have included all the transaction logs that you must restore, select RECOVER WITH RECOVERY.
  • If you must restore additional transaction logs, select RECOVER WITH NORECOVERY.
  • The third option, RECOVER WITH STANDBY is not used in this scenario.


Note:

For more information about these recovery options, see Restore Database (Options Page) (http://go.microsoft.com/fwlink/?LinkId=114420).

  1. Click OK to complete the recovery operation.
  2. Repeat steps 4 through 10 for each database that you are restoring.
  3. Start the Windows SharePoint Services Timer service.
  1. Re-register the membership and role providers in the Web.config file.
  2. Redeploy the providers.

For more information, see Configure forms-based authentication for a claims-based Web application (SharePoint Foundation 2010) (http://technet.microsoft.com/library/f7b57d4b-87d7-41e6-9e55-350d6ad41894(Office.14).aspx).

  1. In Central Administration, click Manage Web application, select a Web application that uses claims-based authentication, and then click Authentication Providers.
  2. Select a zone that the Web application is associated with to open the Edit Authentication page, and then click Save.
  3. Repeat for each zone, and then for each Web application that uses claims-based authentication.
  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt, type the following command:

    Restore-SPFarm -Directory <BackupFolder> -Item <ServiceApplicationName> -RecoveryMethod Overwrite [-BackupId <GUID>] [-Verbose]

    To specify which backup to use, use the BackupId

    parameter. You can view the backups for the farm by typing the following: Get-SPBackupHistory -Directory <Backup folder> -ShowBackup

    . If you do not specify the BackupId

    , the most recent backup will be used. You cannot restore a service application from a configuration-only backup.

 

For more information, see Restore-SPFarm (http://technet.microsoft.com/library/8e18ea80-0830-4ffa-b6b6-ad18a5a7ab3e(Office.14).aspx).


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  • Use Central Administration to restore a service application

    Use the following procedure to restore a service application by using the SharePoint Central Administration Web site.

     

    To restore a service application by using Central Administration

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.
  2. In Central Administration, on the Home page, in the Backup and Restore section, click Restore from a backup.
  3. On the Restore from Backup — Step 1 of 3: Select Backup to Restore page, select the backup job that contains the service application backup, or a farm-level backup, from the list of backups, and then click Next. You can view more details about each backup by clicking the (+) next to the backup.


Note:

If the correct backup job does not appear, in the Backup Directory Location text box, type the path of the correct backup folder, and then click Refresh.

You cannot use a configuration-only backup to restore the farm.

  1. On the Restore from Backup — Step 2 of 3: Select Component to Restore page, expand Shared Services Applications, select the check box that is next to the service application, and then click Next.
  2. On the Restore from Backup — Step 3 of 3: Select Restore Options page, in the Restore Component section, make sure that Farm\Shared Services Applications\<Service application> appears in the Restore the following component list.

    In the Restore Options section, under Type of restore, select the Same configuration option. A dialog box will appear that asks you to confirm the operation. Click OK.

    Click Start Restore.

  3. You can view the general status of all recovery jobs at the top of the Backup and Restore Job Status page in the Readiness section. You can view the status for the current recovery job in the lower part of the page in the Restore section. The status page updates every 30 seconds automatically.

    You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take a several seconds for the recovery to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Sprestore.log file at the UNC path that you specified in step 3.

  • Use SQL Server tools to restore the databases for a service application

    You cannot restore the complete service application by using SQL Server tools. However, you can use SQL Server tools to restore the databases that are associated with the service application. To restore the complete service application, use either Windows PowerShell or Central Administration.

     

    To restore the databases for a service application by using SQL Server tools

  1. Verify that the user account that you are using to restore the databases is a member of the SQL Server sysadmin fixed server role on the database server where each database is stored.
  2. Open SQL Server Management Studio and connect to the database server.
  3. In Object Explorer, expand Databases.
  4. Right-click the database that you want to restore, point to Tasks, point to Restore, and then click Database.
  5. In the Restore Database dialog box, on the General page, select the database to restore to from the To database drop-down list.
  6. Select the restore source from the From database drop-down list.
  7. In the Select the backup sets to restore section area, select the check box next to the database.
  8. On the Options tab, select the recovery state from the Recover state section.

    For more information about which recovery type to use, see Overview of Recovery Models (http://go.microsoft.com/fwlink/?LinkId=114396) in SQL Server Books Online.

  9. Click OK to restore the database.
  10. Repeat steps 1-9 for each database that is associated with the service application.

 

 

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin. Additionally, verify that the user account performing this procedure has read permissions to the backup folder and is a member of the db_owner fixed database role on both the farm configuration database and the content database where the site collection is being restored.
  2. On the Start menu, click Administrative Tools.
  3. Click SharePoint 2010 Management Shell.
  4. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

    Restore-SPSite -Identity <Site collection URL> -Path <Backup file> [-DatabaseServer <Database server name>] [-DatabaseName <Content database name>] [-HostHeader <Host header>] [-Force] [-GradualDelete] [-Verbose]

    If you want to restore the site collection to a specific content database, use the DatabaseServer

    and DatabaseName

    parameters to specify the content database. If you do not specify a content database, the site collection will be restored to a content database chosen by Microsoft SharePoint Foundation 2010.

     

    If you are restoring a host-named site collection, use the Identity

    parameter to specify the URL of the host-named site collection and use the HostHeader

    parameter to specify the URL of the Web application that will hold the host-named site collection.

    If you want to overwrite an existing site collection, use the Force

    parameter.

     


Note:

If the site collection that you are restoring is 1 gigabyte or larger, you can use the GradualDelete

parameter for better performance during the restore process. When this parameter is used, the site collection that is overwritten is marked as deleted, which immediately prevents any additional access to its content. The data in the marked site collection is then deleted gradually over time by a timer job instead of all at the same time, which reduces the impact on server performance.

For more information, see Restore-SPSite (http://technet.microsoft.com/library/90f19a58-0455-470c-a8ee-3129fc341f62(Office.14).aspx).

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.
  2. In Central Administration, on the Home page, in the Backup and Restore section, click Restore from a backup.
  3. On the Restore from Backup — Step 1 of 3: Select Backup to Restore page, from the list of backups, select the backup job that contains the solution package, and then click Next. You can view more details about each backup by clicking the (+) next to the backup.


Note:

If the correct backup job does not appear, in the Backup Directory Location text box, type the Universal Naming Convention (UNC) path of the correct backup folder, and then click Refresh.

  1. On the Restore from Backup  — Step 2 of 3: Select Component to Restore page, select the check box that is next to the solution, and then click Next.
  2. On the Restore from Backup — Step 3 of 3: Select Restore Options page, in the Restore Component section, ensure that Solution appears in the Restore the following component list.

    In the Restore Only Configuration Settings section, ensure that the Restore content and configuration settings option is selected.

    In the Restore Options section, under Type of Restore, select the Same configuration option. A dialog box appears that asks you to confirm the operation. Click OK.

    Click Start Restore.

  3. You can view the general status of all recovery jobs at the top of the Backup and Restore Job Status page in the Readiness section. You can view the status for the current recovery job in the lower part of the page in the Restore section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the recovery to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Sprestore.log file at the UNC path that you specified in step 3.

     

To restore a trusted solution by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.

 

  1. At the Windows PowerShell command prompt, type the following command:

Restore-SPFarm -Directory <BackupFolder> -RestoreMethod Overwrite -BackupId <GUID> -Item <SolutionPath>

Where:

  • <BackupFolder> is the UNC location of the directory that you want to restore from.
  • <GUID> is the GUID of the backup ID that you want to restore from. If you do not specify a backup, the most recent one is used.
  • <SolutionPath> is the path of the solution within the backup tree (usually farm\solutions\SolutionName).

 

For more information, see Restore-SPFarm (http://technet.microsoft.com/library/8e18ea80-0830-4ffa-b6b6-ad18a5a7ab3e(Office.14).aspx).

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

Restoring a sandboxed solution

You cannot restore only customizations that were deployed as sandboxed solutions. Instead, you must restore the farm, Web application, content database, or site collection with which the customization is associated. For more information about these methods of restoring, see Related content later in this article.

  • Restoring authored site elements

    You cannot restore only authored site elements. Instead, you must restore the farm, Web application, or content database with which the authored site element is associated. For more information about these methods of backing up, see Related content.

  • Restoring workflows

    Workflows are a special case of customizations that you can restore. Make sure that the backup and recovery plan includes any of the following scenarios that apply to the environment:

    • Declarative workflows, such as those created in Microsoft SharePoint Designer 2010, are stored in the content database for the site collection to which they are they are deployed. Restoring the content database or site collection restores these workflows.
    • Custom declarative workflow actions have components in the following three locations:
  1. The Microsoft Visual Studio 2010 assemblies for the actions are stored in the global assembly cache (GAC).
  2. The XML definition files (.actions files) are stored in the 14\TEMPLATE\<LCID>\Workflow directory.
  3. An XML entry to mark the action as an authorized type is stored in the Web.config file for the Web applications in which it is used.

    If the farm workflows use custom actions, you should use a file restore system to restore these files and XML entries. You can reapply the files as needed after recovery.

  • Workflows that depend on custom code, such as those that are created by using Visual Studio 2010, are stored in two locations. The Visual Studio 2010 assemblies for the workflow are stored in the GAC, and the XML definition files are stored in the Features directory. This is the same as other types of SharePoint Foundation features such as Web Parts and event receivers. If the workflow was installed as part of a solution package, follow the instructions for restoring solution packages.
  • If you create a custom workflow that interacts with a site collection other than the one where the workflow is deployed, you must restore both site collections to recover the workflow. Restoring a farm is sufficient to recover all site collections in the farm and all workflows that are associated with them.
  • Workflows that have not been deployed must be restored separately by using a file system backup application.
  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

    Restore-SPFarm -Directory <Backup folder name> -RestoreMethod Overwrite -Item <Content database name> [-BackupId <GUID>] [-Verbose]


Note:

If you are not logged on as the Farm account, you are prompted for the Farm account’s credentials.

If you do not use the BackupId

parameter, the most recent backup will be used. To view a list of the backups, including their Backup IDs, type the following command, and then press ENTER:

Get-SPBackupHistory -Directory <Backup folder>

For more information, see Restore-SPFarm (http://technet.microsoft.com/library/8e18ea80-0830-4ffa-b6b6-ad18a5a7ab3e(Office.14).aspx).

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  • Use Central Administration to restore a content database

    You can use Central Administration to restore a farm or components of a farm.

     

    To restore a content database by using Central Administration

  1. Verify that you are logged on as a member of the Farm Administrators group.
  2. In Central Administration, on the Home page, in the Backup and Restore section, click Restore from a backup.
  3. On the Restore from Backup — Step 1 of 3: Select Backup to Restore page, from the list of backups, select the backup job that contains the content database backup, and then click Next.


Note:

If the correct backup job does not appear, in the Current Directory Location text box, enter the path of the correct backup folder, and then click Refresh.

  1. On the Restore from Backup — Step 2 of 3: Select Component to Restore page, select the check box that is next to the content database, and then click Next.


Note:

If the content database is not selectable, you must use Windows PowerShell or SQL Server tools to restore the content database.

  1. On the Restore from Backup — Step 3 of 3: Select Restore Options page, in the Restore Options section, under Type of Restore, click the Same configuration option. A dialog box appears that asks you to confirm the operation. Click OK.

    Click Start Restore.

  2. You can view the general status of all recovery jobs at the top of the Backup and Restore Job Status page in the Readiness section. You can view the status for the current recovery job in the lower part of the page in the Restore section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the recovery to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Sprestore.log file at the UNC path that you specified in step 2.

  • Use SQL Server tools to restore a content database

    You can use SQL Server tools to restore a content database by following these steps:

  1. If possible, back up the live transaction log of the content database to protect any changes that were made after the last full backup.
  2. Restore the last full database backup.
  3. Restore the most recent differential database backup that occurred after the most recent full database backup.
  4. Restore all transaction log backups that occurred after the most recent full or differential database backup.

 

To restore a content database by using SQL Server tools

  1. Verify that the user account performing this procedure is a member of the sysadmin fixed server role.
  2. If the Windows SharePoint Services Timer service is running, stop the service and wait for several minutes for any currently running stored procedures to finish. Do not restart the service until after you restore the content databases.
  3. Start SQL Server Management Studio and connect to the database server.
  4. In Object Explorer, expand Databases.
  5. Right-click the database that you want to restore, point to Tasks, point to Restore, and then click Database.

    The database is automatically taken offline during the recovery operation and cannot be accessed by other processes.

  6. In the Restore Database dialog box, specify the destination and the source, and then select the backup set or sets that you want to restore.

    The default values for destination and source are appropriate for most recovery scenarios.

  7. In the Select a page pane, click Options.
  8. In the Restore options section, select only Overwrite the existing database. Unless the environment or policies require otherwise, do not select the other options in this section.
  9. In the Recovery state section:
  • If you have included all the transaction logs that you must restore, select RECOVER WITH RECOVERY.
  • If you must restore additional transaction logs, select RECOVER WITH NORECOVERY.
  • The third option, RECOVER WITH STANDBY is not used in this scenario.


Note:

For more information about these recovery options, see Restore Database (Options Page) (http://go.microsoft.com/fwlink/?LinkId=114420).

  1. Click OK to complete the recovery operation.
  2. Repeat steps 4 through 10 for each database that you are restoring.
  3. Start the Windows SharePoint Services Timer service.
  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

    Mount-SPContentDatabase -Name <Database name> -WebApplication <Web application ID> [-Verbose]


Note:

Attaching a content database by using the Mount-SPContentDatabase

cmdlet differs from attaching a database in SQL Server by using SQL Server tools. Mount-SPContentDatabase

associates the content database with a Web application so that the contents can be read.

 

For more information, see Mount-SPContentDatabase (http://technet.microsoft.com/library/20d1bc07-805c-44d3-a278-e2793370e237(Office.14).aspx).

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

    Import-SPWeb -Identity <Site URL> -Path <Export file name> [-Force] [-NoFileCompression] [-Verbose]


Important:

The site or subsite that you are importing must have a template that matches the template of the site specified by Identity

.

You can also use the Get-SPWeb

cmdlet and pass the ID to Import-SPWeb

by using the Windows PowerShell pipeline. The value of the Path

parameter specifies the path and file name of the file from which to import the list or library. To include the user security settings with the list or document library, use the IncludeUserSecurity

parameter. To overwrite the list or library that you specified, use the Force

parameter. You can use the UpdateVersions

parameter to specify how versioning conflicts will be handled. To view the progress of the operation, use the Verbose

parameter.

The NoFileCompression

parameter lets you specify that no file compression is performed during the import process. Using this parameter can lower resource usage up to 30% during the export and import process. If you are importing a site, list, or document library that you exported from Central Administration, or if you exported a site, list, or document library by using Windows PowerShell and you did not use the NoFileCompression

parameter in the Export-SPWeb

cmdlet, you cannot use this parameter in the Import-SPWeb

cmdlet.


Note:

There is no facility in the Import-SPWeb

cmdlet import a subset of the items in the export file. Therefore, the import operation will import everything from the file.

For more information, see Import-SPWeb (http://technet.microsoft.com/library/2ecc5b6e-1b23-4367-a966-b7bd3377db3a(Office.14).aspx).

 


Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

 

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt, type the following commands, and then press ENTER:

    $db = get-spdatabase | where {$_.Name -eq “database name“}

    $db.AddFailoverServiceInstance(“mirrored database name“)

    $db.Update()

For more information, see Get-SPDatabase (http://technet.microsoft.com/library/c9802bf8-5216-4ade-b559-7ee25fcfa666(Office.14).aspx).

  1. On the principal server, create a certificate and open a port for mirroring.

–On the master database, create the database master key, if needed
CREATE MASTER KEY ENCRYPTION BY PASSWORD = ‘<test1234->’;
GO
— Make a certificate for this server instance.
USE master;
CREATE CERTIFICATE <MASTER_HostA_cert>
WITH SUBJECT = ‘<Master_HostA certificate>’;
GO
–Create a mirroring endpoint for server instance by using the certificate
CREATE ENDPOINT Endpoint_Mirroring
STATE = STARTED
AS TCP (
LISTENER_PORT=5024
, LISTENER_IP = ALL
)
FOR DATABASE_MIRRORING (
AUTHENTICATION = CERTIFICATE <MASTER_HostA_cert>
, ENCRYPTION = REQUIRED ALGORITHM RC4
, ROLE = ALL
);
GO

  1. On the principal server, back up the certificate.

–Back up the HOST_A certificate.
BACKUP CERTIFICATE MASTER_HostA_cert TO FILE = ‘<c:\MASTER_HostA_cert.cer>’;
GO

  1. On the principal server, back up the database. This example uses the configuration database. Repeat for all databases.

USE master;
–Ensure that SharePoint_Config uses the full recovery model.
ALTER DATABASE SharePoint_Config
SET RECOVERY FULL;
GO
USE SharePoint_Config
BACKUP DATABASE SharePoint_Config
TO DISK = ‘<c:\SharePoint_Config.bak>’
WITH FORMAT
GO
BACKUP Log SharePoint_Config
TO DISK = ‘<c:\SharePoint_Config_log.bak>’
WITH FORMAT
GO

  1. Copy the backup file to the mirror server. Repeat for all databases.
  2. By using any secure copy method, copy the backup certificate file (C:\HOST_HostA_cert.cer, for example) to the mirror server.
  3. On the principal server, create a login and user for the mirror server, associate the certificate with the user, and grant the login connect permissions for the partnership.

–Create a login on HOST_A for HOST_B
USE master;
CREATE LOGIN <HOST_HostB_login> WITH PASSWORD = ‘<1234-test>’;
GO
–Create a user for that login.
CREATE USER <HOST_HostB_user> FOR LOGIN <HOST_HostB_login>;
GO
–Associate the certificate with the user
CREATE CERTIFICATE <HOST_HostB_cert>
AUTHORIZATION <HOST_HostB_user>
FROM FILE = ‘<c:\HOST_HostB_cert.cer>’ –do not use a network path, SQL Server will give an error about the key not being valid
GO
–Grant CONNECT permission on the login for the remote mirroring endpoint.
GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [<HOST_HostB_login>];
GO

 

To set up the mirror server for outbound connections

  1. On the mirror server, create a certificate and open a port for mirroring.

–On the master database, create the database master key, if needed.
USE master;
CREATE MASTER KEY ENCRYPTION BY PASSWORD = ‘<1234-test>’;
GO
— Make a certificate on the HOST_B server instance.
CREATE CERTIFICATE <HOST_HostB>
WITH SUBJECT = ‘<HOST_HostB certificate for database mirroring>’;
GO
–Create a mirroring endpoint for the server instance on HOST_B.
CREATE ENDPOINT Endpoint_Mirroring
STATE = STARTED
AS TCP (
LISTENER_PORT=5024
, LISTENER_IP = ALL
)
FOR DATABASE_MIRRORING (
AUTHENTICATION = CERTIFICATE <HOST_HostB>
, ENCRYPTION = REQUIRED ALGORITHM RC4
, ROLE = ALL
);
GO

  1. On the mirror server, back up the certificate.

–Back up the HOST_B certificate.
BACKUP CERTIFICATE <HOST_HostB> TO FILE = ‘<C:\HOST_HostB_cert.cer>’;
GO

  1. By using any secure copy method, copy the backup certificate file (C:\HOST_HostB_cert.cer, for example) to the principal server.
  2. On the mirror server, restore the database from the backup files. This example uses the configuration database. Repeat for all databases.

RESTORE DATABASE SharePoint_Config
FROM DISK = ‘<c:\SharePoint_Config.bak>’
WITH NORECOVERY
GO
RESTORE log SharePoint_Config
FROM DISK = ‘<c:\SharePoint_Config_log.bak>’
WITH NORECOVERY
GO

 

To set up the mirror server for inbound connections

  1. On the mirror server, create a login and user for the principal server, associate the certificate with the user, and grant the login connect permissions for the partnership.

–Create a login on HOST_B for HOST_A
USE master;
CREATE LOGIN <MASTER_HostA_login> WITH PASSWORD = ‘<test1234->’;
GO
–Create a user for that login.
CREATE USER <MASTER_HostA_user> FOR LOGIN <MASTER_HostA_login>;
GO
–Associate the certificate with the user
CREATE CERTIFICATE <MASTER_HostA_cert>
AUTHORIZATION <MASTER_HostA_user>
FROM FILE = ‘<c:\MASTER_HostA_cert.cer>’ –do not use a network path, SQL Server will give an error about the key not being valid
GO
–Grant CONNECT permission on the login for the remote mirroring endpoint.
GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [<MASTER_HostA_login>];
GO

 

To set up the principal server for inbound connections

  1. On the principal server, create a login and user for the mirror server, associate the certificate with the user, and grant the login connect permissions for the partnership.

–Create a login on HOST_A for HOST_B
USE master;
CREATE LOGIN <HOST_HostB_login> WITH PASSWORD = ‘<1234-test>’;
GO
–Create a user for that login.
CREATE USER <HOST_HostB_user> FOR LOGIN <HOST_HostB_login>;
GO
–Associate the certificate with the user
CREATE CERTIFICATE <HOST_HostB_cert>
AUTHORIZATION <HOST_HostB_user>
FROM FILE = ‘<c:\HOST_HostB_cert.cer>’ –do not use a network path, SQL Server will give an error about the key not being valid
GO
–Grant CONNECT permission on the login for the remote mirroring endpoint.
GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [<HOST_HostB_login>];
GO

 

To set up the mirroring partners

  1. On the principal server, set up the mirroring partnership. This example uses the configuration database. Repeat for all databases.

–At HOST_A, set the server instance on HOST_B as a partner (mirror server).
ALTER DATABASE SharePoint_Config
SET PARTNER = ‘<TCP://databasemirror.adatum.com:5024>’;
GO

  1. On the mirror server, set up the mirroring partnership. This example uses the configuration database. Repeat for all databases.

–At HOST_B, set the server instance on HOST_A as a partner (principal server):
ALTER DATABASE SharePoint_Config
SET PARTNER = ‘<TCP://databasemaster.adatum.com:5024>’;
GO

  • Set up a witness server

    Each step lists the server on which it should be performed. Use Transact-SQL to send these commands to SQL Server. Placeholder information is denoted by angle brackets (<>); replace this with information that is specific to your deployment.

  1. On the witness server, set up the certificate and open the port.

–On the master database, create the database master key, if needed
CREATE MASTER KEY ENCRYPTION BY PASSWORD = ‘<1234test->’;
GO
— Make a certificate for this server instance.
USE master;
CREATE CERTIFICATE <WITNESS_HostC_cert>
WITH SUBJECT = ‘<Witness_HostC certificate>’;
GO
–Create a mirroring endpoint for server instance by using the certificate
CREATE ENDPOINT Endpoint_Mirroring
STATE = STARTED
AS TCP (
LISTENER_PORT=5024
, LISTENER_IP = ALL
)
FOR DATABASE_MIRRORING (
AUTHENTICATION = CERTIFICATE <WITNESS_HostC_cert
, ENCRYPTION = REQUIRED ALGORITHM RC4
, ROLE = ALL
);
GO

  1. On the witness server, back up the certificate.

–Back up the HOST_C certificate
BACKUP CERTIFICATE <WITNESS_HostC_cert> TO FILE = ‘<c:\ WITNESS_HostC_cert.cer>’;
GO

  1. By using any secure copy method, copy the backup certificate file (C:\WITNESS_HOSTC_cert.cer, for example) to the principal server and the mirror server.
  2. On the witness server, create logins and users for the principal and mirror servers, associate the certificates with the users, and grant the logins connect permissions for the partnership.

–Create a login on witness HOST_C for principal HOST_A
USE master;
CREATE LOGIN <MASTER_HostA_login> WITH PASSWORD = ‘<test1234->’;
GO
–Create a user for that login.
CREATE USER <MASTER_HostA_user> FOR LOGIN <MASTER_HostA_login>;
GO
–Associate the certificate with the user
CREATE CERTIFICATE <MASTER_HostA_cert>
AUTHORIZATION <MASTER_HostA_user>
FROM FILE = ‘<c:\MASTER_HostA_cert.cer>’ –do not use a network path, SQL Server will give an error about the key not being valid
GO
–Grant CONNECT permission on the login for the remote mirroring endpoint.
GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [<MASTER_HostA_login>];
GO
–Create a login for the mirror Host_B
CREATE LOGIN <HOST_HostB_login> WITH PASSWORD = ‘<1234-test>’;
GO
–Create a user for that login.
CREATE USER <HOST_HostB_user> FOR LOGIN <HOST_HostB_login>;
GO
–Associate the certificate with the user
CREATE CERTIFICATE <HOST_HostB_cert>
AUTHORIZATION <HOST_HostB_user>
FROM FILE = ‘<c:\HOST_HostB_cert.cer>’ –do not use a network path, SQL Server will give an error about the key not being valid
GO
–Grant CONNECT permission on the login for the remote mirroring endpoint.
GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [<HOST_HostB_login>];
GO

  1. On the principal server, create a login and user for the witness server, associate the certificate with the user, and grant the login connect permissions for the partnership. Repeat for the mirror server.

–Create a login on master HostA for witness HostC
USE master;
CREATE LOGIN <WITNESS_HostC_login> WITH PASSWORD = ‘<1234test->’;
GO
–Create a user for that login.
CREATE USER <WITNESS_HostC_user> FOR LOGIN <WITNESS_HostC_login>;
GO
–Associate the certificate with the user
CREATE CERTIFICATE <WITNESS_HostC_cert>
AUTHORIZATION <WITNESS_HostC_user>
FROM FILE = ‘<c:\WITNESS_HostC_cert.cer>’ –do not use a network path, SQL Server will give an error about the key not being valid
GO
–Grant CONNECT permission on the login for the remote mirroring endpoint.
GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [<WITNESS_HostC_login>];
GO

  1. On the principal server, attach the witness server. This example uses the configuration database. Repeat for all databases.

–Set up the witness server
ALTER DATABASE SharePoint_Config
SET WITNESS =
‘<TCP://databasewitness.adatum.com:5024>’
GO


Discover more from Escape Business Solutions

Subscribe to get the latest posts sent to your email.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.