If users update content on the site while you are backing up a SharePoint site collection, the backup file may become corrupted

This article has been archived. It is offered "as is" and will no longer be updated.
SYMPTOMS
If users update content on the site while you are backing up a SharePoint site collection, the backup file may become corrupted. Then, when you try to restore the site to another location, the restore operation fails.

Note To back up a SharePoint site collection, you can use the following command:
stsadm -o backup -url http://server_name/sites/site_name -filename site_name.bak
WORKAROUND
To work around this issue, follow these steps:
  1. Use the Stsadm.exe utility to obtain the current site collection lock state and note it. The following is an example:
    stsadm -o getsitelock -url http://server_name/sites/site_name
  2. If the current site collection lock state is "none" or "noadditions," use the Stsadm.exe utility to set the site collection lock state to "readonly." This will let users continue reading content within the site, but it will prevent them from adding, editing, or deleting content within the site. The following is an example:
    stsadm -o setsitelock -url http://server_name/sites/site_name -lock readonly
  3. Use the Stsadm.exe utility to back up the site collection. The following is an example:
    stsadm -o backup -url http://server_name/sites/site_name -filename site_name.bak
  4. After the site collection backup has completed, use the Stsadm.exe utility to return the site collection lock back to its initial state. This is the state that you noted in step 1. The following is an example:
    stsadm -o setsitelock -url http://server_name/sites/site_name -lock none
    Note When you restore the site collection, its site collection lock will be in the same state that it was during the backup. If you set the site collection lock state to "readonly" during the backup to prevent users from making changes to the site collection while it is being backed up, it will also be "readonly" after it is restored. You must use the Stsadm.exe utility to reset the site collection lock to its desired state after the restore has completed. The following is an example:
    stsadm -o setsitelock -url http://server_name/sites/site_name -lock none
RESOLUTION
To resolve this issue, install the hotfix package that is described in Microsoft Knowledge Base article 968857. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
968857 Description of the Windows SharePoint Services 3.0 hotfix package (Sts.msp): April 28, 2009
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
MORE INFORMATION
After you apply this hotfix, the site collection backup behavior changes.

During the site collection backup operation, the Stsadm.exe utility will automatically set the site collection lock to be "readonly" if it was "none" or "noadditions." Then it will perform the site collection backup and then return the site collection lock back to its initial state. The Stsadm.exe utility will record the site collection’s initial lock state in the backup file so that a site collection restore will preserve the initial site collection lock state instead of the "readonly" state that it automatically set during the backup.

If you want to use the previous site collection backup behavior where the Stsadm.exe utility does not modify the site collection lock during a site collection backup, you can add the new "-nositelock" parameter to the command. The following is an example:
stsadm -o backup -url http://server_name/sites/site_name -filename site_name.bak -nositelock
Properties

Article ID: 967568 - Last Review: 01/16/2015 03:44:42 - Revision: 2.1

  • Microsoft Windows SharePoint Services 3.0
  • Microsoft Office SharePoint Server 2007
  • kbnosurvey kbarchive kbexpertiseinter kbqfe kbfix kbsurveynew kbprb KB967568
Feedback