Archive and retrieve content by using Stsadm import and export operations (Office SharePoint Server 2007)

Applies To: Office SharePoint Server 2007

This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.

 

Topic Last Modified: 2009-02-13

This topic provides information on using the Import and Export operations of the Stsadm command-line tool to help move, migrate, back up, and restore sites and content within Microsoft Office SharePoint Server 2007. Import and Export can be used to:

  • Migrate content from one server to another.

  • Move a site from one site collection to another.

  • Protect and restore site content in case of data loss.

  • Archive site content for long-term storage.

Note

Some site settings, such as Recycle Bin state and alerts, are not saved during Import and Export operations.

Archive site content by using the Stsadm command-line tool

You can use the Stsadm export operation to save a site or subsite. Although using the export operation saves data for you, it is not the same as using the backup operation. You cannot save a workflow, alerts, features, solutions, or Recycle-Bin state by using the export operation. If you want a full-fidelity backup, use the Stsadm backup operation to back up the site collection as described in Back up a farm by using the Stsadm command-line tool (Office SharePoint Server 2007).

Before you perform this procedure, confirm that you have read the topic Plan for backup and recovery (Office SharePoint Server).

Important

The account that you use must be a member of the Administrators group on the local server computer that is hosting the SharePoint Central Administration Web site and a member of the dbowner fixed database role in SQL Server to complete this procedure.

Archive SharePoint sites and content by using the Stsadm export operation

  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, and then press ENTER:
    stsadm –o export –url <URL of the site you want to archive> -filename <Archive file name> –includeusersecurity –versions 4

    The includeusersecurity parameter ensures that the archived content or site will have the same permission requirements as the original. Setting the versions value at 4 ensures that all content regardless of version will be included in the archive. For more information, see Export: Stsadm operation (Office SharePoint Server)

    Note

    If there are errors or warnings, or if the export does not complete successfully, see the export log file for the file that you specified in step 2.

Retrieve site content by using the Stsadm command-line tool

You can use the Stsadm import operation to insert an archived site into a different site collection or to move an entire site collection to a different database or Web application. Although using the import operation imports data, it is not the same as using the restore operation. You cannot restore workflow, alerts, features, solutions, or Recycle-Bin state by using the import operation. If you want a full-fidelity recovery, use the restore operation to import the entire the site collection as described in Restore a farm by using the Stsadm command-line tool (Office SharePoint Server 2007).

Before you perform this procedure, confirm that you have read the topic Plan for backup and recovery (Office SharePoint Server).

Important

If you export a site and then import that site to another location, the new site retains many of the settings used on the original site. As a result, breadcrumb navigation on the new site might not appear the way you want it to. The UseShared property can be set to False to retain the original breadcrumb links, or to True to adapt them from the parent site. For more information, see the Update UseShared property procedure in this article.

Important

Memberships in the Administrators group on the local computer that is hosting the SharePoint Central Administration Web site and in the dbowner fixed database role in SQL Server are the minimum required to complete this procedure.

Import SharePoint sites and objects by using the Stsadm import operation

  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, and then press ENTER:
    stsadm –o import –url <URL of the site you want to import to> -filename <file name of the archive file> –includeusersecurity

    The includeusersecurity option ensures that the imported content or site will have the same permission requirements as the original. For more information, see Import: Stsadm operation (Office SharePoint Server).

    Note

    If there are errors or warnings, or if your import does not complete successfully, the system generates an error message that includes the path of the log file.

Update UseShared property

  1. On the imported site, click Site Actions, and then click Site Settings.

  2. On the Site Settings page, under Look and Feel, click Top link bar.

  3. To inherit the links from the parent site, click Use Links from Parent on the Top Link Bar page.
    -OR-
    To retain the original breadcrumb path, click Stop Inheriting Links on the Top Link Bar page.

  4. Click OK.

See Also

Concepts

Use alternative methods of backup and recovery (Office SharePoint Server 2007)
Capture and restore content by using the Web site delete event (Office SharePoint Server 2007)
Capture and restore content by using SharePoint Designer (Office SharePoint Server 2007)
Archive site versions by using database snapshots (Office SharePoint Server 2007)