Back up and restore customizations (Windows SharePoint Services)

Windows SharePoint Services 3.0

Updated: July 16, 2009

Applies To: Windows SharePoint Services 3.0


Topic Last Modified: 2009-07-15

This article describes how to back up and restore customizations that have been made to SharePoint sites.

Customizations to SharePoint sites can include the following:

  • Master pages, page layouts, and cascading style sheets. These objects are stored in the content database for a Web application.

  • Web Parts, site or list definitions, custom columns, new content types, custom fields, custom actions, coded workflows, and workflow activities and conditions.

  • Third-party solutions and their associated binary files and registry keys, such as IFilters.

  • Changes to standard XML files.

  • Custom site definitions (Webtemp.xml files).

  • Resource (.resx) files.

The method that you use to back up and restore customizations is partly determined by whether the SharePoint site customizations are centrally managed.

An environment is considered to be centrally managed if all customizations and changes are deployed by a specific group or individual who is assigned to this task. Typically, a change control methodology is used to document and manage system changes. In a centrally managed environment, the locations of the customization files are always known.

An environment is not considered to be centrally managed if various teams or individuals perform customizations without using change control or other ways of identifying and managing the customizations. In this case, customization files can be put in nonstandard, undocumented locations, making them difficult to back up and restore.

For best practices and recommendations about how to manage SharePoint site customizations, see SharePoint Products and Technologies customization policy (white paper).

In centrally managed systems, site customizations can be packaged as solution files. A solution file has a .cab-based format and a .wsp extension. A solution is a deployable, reusable package that can contain a set of feature definitions and related element definitions that include files, site definitions, and assemblies. For example, you can use the solution file to deploy the contents of a Web Part package, including assemblies, class resources, .dwp files, and other package components.

We recommend that you package site customizations as solution files, which you can then easily back up and restore as needed by using a file system backup solution.

You can also package certain kinds of customizations as content deployment packages; for more information, see Deploying authored site element customizations.

Binary files and registry keys that are associated with third-party customizations are not handled by solution packages without custom coding.

To create a solution package, we recommend that you use Visual Studio Extensions for WSS (VSeWSS) ( Note that VSeWSS with support for x64 development is available as a Community Technology Preview (CTP) download.

To simplify the recovery process, create a set of solution packages that contain configuration elements that are specific to certain kinds of sites or site collections. You can then recover different site collection configurations by deploying specific solution packages to front-end Web servers.

Restoring customizations to a site collection involves importing the solution package to the server and then deploying the solution package. You can restore a solution package by using either the Stsadm command-line tool or the SharePoint Central Administration Web site. You can restore a single solution package to multiple site collections and servers.

For more information about solution packages and deploying customizations, see the following articles:

You must be a member of the Administrators group on any computer on which you run the Stsadm command-line tool. You must be a member of the Farm Administrators SharePoint group to use the Central Administration Web site, and you must be a member of the db_owner role on the Windows SharePoint Services configuration database.
Import a solution package by using the Stsadm command-line tool
  1. On the drive on which SharePoint Products and Technologies is installed, change to the following directory: %COMMONPROGRAMFILES%\Microsoft Shared\Web Server Extensions\12\Bin

  2. Type the following command:

    stsadm -o addsolution -filename <"Solution filename">

Restore a solution package by using the Stsadm command-line tool
  1. Type the following command:

    stsadm -o deploysolution -name <"Solution filename"> -url <URL name>

  2. Add one of the following parameters to the command line to specify a time for the command to run:




The syntax for the preceding command assumes that the solution is scoped to an object that is smaller than the farm. If this is not the case, remove the <URL> parameter from the command line. If the solution has any assemblies to deploy in the global assembly cache (GAC), add the [-allowgacdeployment] parameter to the command line.
Restore a solution package by using Central Administration
  1. In Central Administration, on the Operations page, in the Global Configuration section, click Solution management.

  2. On the Solution Management page, click the solution that you want to restore.

  3. On the Solution Properties page, click Deploy Solution.

  4. On the Deploy Solution page, in the Deploy When section, select one of the following options:

    • Now

    • At a specified time. If you select this option, specify a time by using the date and time boxes. We recommend that you select a time when the load on the destination servers is low.

  5. In the Deploy To section, in the A specific Web application list, click either All Web applications or select a specific Web application.

  6. Click OK.

The preceding procedure assumes that the solution is scoped to an object that is smaller than the farm.

Backing up and restoring customizations in a decentralized environment can be a complex process because the customization file locations are not standardized.

The following table lists locations where customizations are often stored on front-end Web servers. Consult with your development team or customization vendor to determine whether your customizations involve additional add-in software or files in other locations. We recommend that you back up these directories with a file system backup solution.




%COMMONPROGRAMFILES%\Microsoft Shared\Web Server Extensions\12

Commonly updated files, custom assemblies, custom templates, custom site definitions


Location of IIS virtual directories


GAC: a protected operating system location where the Microsoft .NET Framework code assemblies are installed to provide full system access

Back up decentralized customizations
  1. Record all customization file names and locations.

  2. Record all changes that have been made to the Web.config files.

  3. Create a backup job by using a file system backup program to back up all customization files in all locations.