Restore databases (Office SharePoint Server)

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: 2016-11-14

You can restore the following databases:

  • Content databases

  • Databases for Shared Services Providers (SSPs)

  • Search databases for the SSPs

  • Search databases

    Note

    The search index is not stored in SQL Server. If you use SQL Server 2005 tools to back up and restore search, you must perform a full crawl upon restoring the database. For more information, see Protecting Search in Choose what to protect (Office SharePoint Server).

  • Central Administration content database

  • Configuration database

    Note

    The configuration database and the Central Administration content database contain computer-specific information. Therefore, you can restore them only to an environment that you configure to be precisely the same, including all software updates, server names, and numbers of servers. That is, you cannot back up the configuration database, change your topology or server roles, and then restore the configuration database.

For more information about using SQL Server to restore databases, see Backing Up and Restoring Databases in SQL Server (https://go.microsoft.com/fwlink/?LinkID=102629&clcid=0x409).

Restore your Office SharePoint Server 2007 databases

When protecting Microsoft Office SharePoint Server 2007, we recommend that you configure a recovery farm—a second farm, that is only used to restore data—for site and item recovery. The recovery farm is not intended to be a live farm. The recovery farm does not need to have the same hardware as your primary farm—we recommend that you use a single server installation or a virtual farm. For more information about creating a recovery farm, see Create a recovery farm (Office SharePoint Server 2007).

If your IT environment requires that your database administrator (DBA) must restore the databases associated with the Shared Services Provider (SSP), you must coordinate your backup and restore operations with your DBA. The account used to restore the databases must be a member of the SQL Server dbcreator fixed server role.

Office SharePoint Server 2007 supports the use of multiple data files for content databases. Although the backup and recovery tools that are built into Office SharePoint Server 2007 can back up and recover multiple data files if you overwrite to the same location that you backed up from, the tools cannot restore multiple data files to a different location. For this reason, we recommend that when you use multiple data files for a content database, you use SQL Server backup and recovery tools.

Restore a database by using built-in tools

Use this procedure to restore a database by using the SharePoint Products and Technologies built-in tools.

Important

Membership in the Farm Administrators SharePoint group is the minimum necessary to complete the following procedure.

Restore a database by using the user interface

  1. On the SharePoint Central Administration Web site, on the Operations page, in the Backup and Restore section, click Restore from Backup.

  2. On the Select Backup Location page, in the Backup File Location section, enter the universal naming convention (UNC) path to the backup folder.

  3. On the Select Backup Package to Restore page, select the backup file you want to use to restore, and then click Continue Restore Process.

  4. On the Select Component to Restore page, select the database you want to restore and then click Continue Restore Process.

  5. On the Select Restore Options page:

    1. In the Restore Component section, verify that the database you selected is displayed.

    2. In the Restore Options section, select Same configuration.
      A message is displayed, notifying you that the current farm will be overwritten. Click OK.

    3. In the New Names section, type new names and URLs for each component, or accept the default values.

  6. Click OK.

Use this procedure to restore a database by using the Stsadm command-line tool.

Important

Membership in the Administrators group on the local computer is the minimum required to complete the following procedure.

Restore a database by using the command line

  1. On the drive where SharePoint Products and Technologies is installed, change to the following directory: %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin.

  2. To obtain the backup GUID for the specific backup that you want to restore, type the following command, and then press ENTER:

    stsadm -o backuphistory -directory <UNC path>

    where UNC path is the path to the shared folder that contains the backup.

  3. If you do not already know the name of the database you want to restore, type the following command, and then press ENTER:

    stsadm –o restore –showtree -directory <UNC path> -backupid <GUID from backuphistory>

    where UNC path is the path to the shared folder that contains the backup and where GUID from backuphistory is the GUID of the backup package that you want to restore.

    Note

    Items enclosed by square brackets ([ ]) cannot be restored.

  4. To restore a database, type the following command and then press ENTER:

    stsadm -o restore -directory <UNC path> -backupid <GUID from backuphistory> -item <created path from tree> -restoremethod overwrite

    where UNC path is the UNC path to the backup shared folder, GUID from backuphistory is the GUID for the specific backup package that you want to restore, and created path from tree is the full farm path notation as displayed by the -showtree parameter.

  5. When you receive a warning that all selected items will be overwritten, type y and then press ENTER.

  6. When prompted, type the user name and password for the database.

  7. If the recovery completes successfully, the command window displays the following text:

    Completed with 0 warnings.
    Completed with 0 errors.
    Restore completed successfully.
    ---------------------------------------------------------
    Operation completed successfully.
    
  8. If the recovery does not complete successfully, the following message appears:

    The restore job failed. For more information, see the error log that is located in the backup directory. 
    

    The referenced error log will be the sprestore.log file in the backup shared folder.

Using SQL Server tools to recover a database

In the event of a failure, you must use your backups to restore the database. You should recover your database in the following order:

  1. If possible, back up the live transaction log of the current database to protect any changes that have been made since the last full backup.

  2. Restore the last full database backup.

  3. Restore the most recent differential database backup since the last full database backup.

  4. Restore all transaction log backups since the last full or differential database backup.

Warning

Recovery of the configuration database cannot be performed using this procedure. To restore the configuration database, see Restore a farm after a configuration database problem (Office SharePoint Server).

Important

Membership in the dbcreator fixed server role is the minimum required to perform the following procedure.

Restore an existing database

  1. If the Windows SharePoint Services Timer service is running, stop the service and wait for a few minutes for any currently running stored procedures to complete. Do not restart the service until you have restored all the databases that you need to restore. To stop the Windows SharePoint Services Timer:

    1. In Microsoft Windows Server 2003, start the Services snap-in.

    2. Under Services (local), click Windows SharePoint Services Timer.

    3. Click Stop this service.

    4. Verify that all running jobs are complete before continuing with this procedure.

  2. Start SQL Server Management Studio and connect to the database server.

  3. In Object Explorer, expand Databases.

  4. Right-click the database that you want to restore, point to Tasks, point to Restore, and then click Database.

    The database is automatically taken offline during the restore operation and cannot be accessed by other processes.

  5. In the Restore Database dialog box, specify the destination and the source, and then select the backup set or sets that you want to restore.

    The default values for destination and source typically suit most recovery scenarios.

  6. In the Select a page pane, click Options.

  7. In the Restore options section, select only Overwrite the existing database. Unless your environment or policies require otherwise, do not select the other options in this section.

  8. In the Recovery state section:

    • If you have included all the transaction logs that you must restore, select RESTORE WITH RECOVERY.

    • If you must restore additional transaction logs, select RESTORE WITH NORECOVERY.

    • The third option, RESTORE WITH STANDBY is not used in this scenario.

      Note

      For more information about these recovery options, see Restore Database (Options Page) (https://go.microsoft.com/fwlink/?LinkId=114420&clcid=0x409).

  9. Click OK to complete the restore operation.

  10. Repeat steps 4 through 9 for each database that you are restoring.

  11. Start the Windows SharePoint Services Timer service:

    • In Microsoft Windows Server 2003, start the Services snap-in.

    • Under Services (local), click Windows SharePoint Services Timer.

    • Click Start this service.

See Also

Concepts

Back up and restore databases (Office SharePoint Server)
Back up databases (Office SharePoint Server)
Back up and restore databases by using DPM (Office SharePoint Server)