Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Copy configuration settings between farms in SharePoint 2013

Published: July 16, 2012

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

Applies to:  SharePoint Foundation 2013 | SharePoint Server 2013 

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

In this article:

Before you begin

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.

    note Note:

    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.

note Note:

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:

Backup and restore a farm without content databases to copy configuration settings in SharePoint 2013

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.

note Note:

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.

    note Note:

    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
    
    
    noteNote:

    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.

    Where:

    • <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.

note 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.

Back up and recover configuration settings only

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.