Backing Up a Single Site


The new version of STSADM even replaces the old Smigrate, which previously was the preferred way of backing up a single site or copying sites between SharePoint servers. The new commands in STSADM are Export for backing up a single site and the Import for restoring the site. Below is a summary of what this new set of commands can do:

  • q It can back up and restore single sites.

  • q It can back up any site including its subsites. It does not have to be the top-level site in the site collection.

  • q It can restore the site permissions (something the old Smigrate could not do).

  • q The result will be stored as a file.

  • q It must be executed on a SharePoint server with a Central Administration tool installed.

  • q You must be the site administrator to run this command.

  • q This is a command line tool. You can schedule it using Windows Tasks.

This is a great tool when you need to make a backup of a single site; for example, when you want to move or copy a site to another SharePoint environment, or to move a site from one site collection to another in the same SharePoint server. In the following example, you will make a backup of a subsite with the URL http://srv1/sitedirectory/it and save the backup file as "it.bak" to the c:\bkup folder. Then you will restore this site to another URL location (http://srv1/sitedirectory/ sales/it) and retain the same user permission settings.

Try It Out Back Up a Single Site with STSADM

image from book
  1. Log on to the SharePoint server as the administrator.

  2. Open a command window and run the following command:

         Stsadm --o export --url http://srv1/sitedirectory/it -includeusersecurity↩ --filename c:\bkup\it.bak 

  3. Open the c:\bkup folder and verify that your backup file is there, along with a log file.

  4. Next, restore this file to the URL http://srv1/sitedirectory/sales/it:

         Stsadm --o import --url http://srv1/sitedirectory/sales/it↩ -includeusersecurity --filename c:\bkup\it.bak 

  5. Log on to the new site and verify that it works and that it has the same user permissions.

image from book



Beginning SharePoint 2007 Administration. Windows SharePoint Services 3 and Microsoft Office SharePoint Server 2007
Software Testing Fundamentals: Methods and Metrics
ISBN: 047143020X
EAN: 2147483647
Year: 2004
Pages: 119

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net