Copy configuration settings between farms in SharePoint 2013


Applies to: SharePoint Foundation 2013, SharePoint Server 2013

Topic Last Modified: 2016-12-16

Summary: Learn how to copy configuration settings from one SharePoint 2013 farm to another.

You can copy configuration settings between SharePoint 2013 farms by using Windows PowerShell.

In this article:

There are many ways in which you can copy configurations from one farm to another. Determine which method to use based on the configuration settings that you want to copy and how often you have to copy them.

  • Back up and restore a farm without the content databases attached. This method gives you farm settings and Web application settings, in addition to the settings for any service applications that you select.

  • Back up and restore configurations only. This method provides you with the core SharePoint Foundation 2013 settings only.

    This method does not include Web application or service application settings. If Web application settings are required in the restored farm, use one of the other methods.
  • Create a deployment script, based on your documented configuration. This method may be more work at first, but is easy to use to maintain standardization.

Because SharePoint 2013 runs as websites in Internet Information Services (IIS), administrators and users depend on the accessibility features that browsers provide. SharePoint 2013 supports the accessibility features of supported browsers. For more information, see the following resources:

To copy configuration settings by using a farm backup, we recommend that you first detach the content databases from the farm. This is not a step that we recommend that you take with a live production farm.

Creating a farm backup without content databases does back up the service applications.
To back up and restore a farm without content databases by using Windows PowerShell
  1. Verify that you have the following memberships:

    • securityadmin fixed server role on the SQL Server instance.

    • db_owner fixed database role on all databases that are to be updated.

    • Administrators group on the server on which you are running the Windows PowerShell cmdlets.

    An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint 2013 Products cmdlets.

    If you do not have permissions, contact your Setup administrator or SQL Server administrator to request permissions. For additional information about Windows PowerShell permissions, see Add-SPShellAdmin.
  2. Start the SharePoint 2013 Management Shell.

    • For Windows Server 2008 R2:

      • On the Start menu, click All Programs, click Microsoft SharePoint 2013 Products, and then click SharePoint 2013 Management Shell.

    • For Windows Server 2012:

      • On the Start screen, click SharePoint 2013 Management Shell.

        If SharePoint 2013 Management Shell is not on the Start screen:

      • Right-click Computer, click All apps, and then click SharePoint 2013 Management Shell.

    For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.

  3. 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 ""}}

  4. Either unmount all content databases, as in the following example:

    Get-SPContentDatabase | Dismount-SPContentDatabase

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

    Get-SPContentDatabase WSS_Content | Dismount-SPContentDatabase
  5. Back up the farm.

    Backup-SPFarm -Directory \\servername\share -BackupMethod Full
    You can view the progress of the backup by looking at the \\servername\share\spbr####\spbackup.log file.
  6. After the backup is complete, re-mount the content databases.

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

    Replace the placeholders with each of the mappings documented in step 1.


    • <WSS_Content> is the <name and ID of the database>.

    • <http://servername> is <the URL of the Web Application>.

For more information, see Get-SPAlternateURL.

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.

As part of farm backup, you can choose to back up only configuration settings. A configuration-only backup extracts and backs up many, but not all, configuration settings from a configuration database. By using built-in tools, you can back up the configuration of any configuration database, whether it is currently attached to a farm or not. For detailed information about how to back up a configuration, see Back up farm configurations in SharePoint 2013.A configuration backup can be restored to the same — or any other — server farm. When a configuration is restored, it will overwrite any settings present in the farm that have values that are set within the configuration backup. If any settings present in the farm are not contained in the configuration backup, they will not be overwritten. For detailed information about how to restore a farm configuration, see Restore farm configurations in SharePoint 2013.