Restaurer des bases de données (Office SharePoint Server)
Mise à jour : 2008-07-24
You can restore the following databases:
Content databases
Databases for Shared Services Providers (SSPs)
Search databases for the SSPs
Search databases
Remarque : 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 Choisir les éléments à protéger (Office SharePoint Server).
Central Administration content database
Configuration database
Remarque : 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 Créer une batterie de serveurs de récupération (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
On the SharePoint Central Administration Web site, on the Operations page, in the Backup and Restore section, click Restore from Backup.
On the Select Backup Location page, in the Backup File Location section, enter the universal naming convention (UNC) path to the backup folder.
On the Select Backup Package to Restore page, select the backup file you want to use to restore, and then click Continue Restore Process.
On the Select Component to Restore page, select the database you want to restore and then click Continue Restore Process.
On the Select Restore Options page:
In the Restore Component section, verify that the database you selected is displayed.
In the Restore Options section, select Same configuration.
A message is displayed, notifying you that the current farm will be overwritten. Click OK.In the New Names section, type new names and URLs for each component, or accept the default values.
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
On the drive where SharePoint Products and Technologies is installed, change to the following directory: %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin.
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.
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.
Remarque : Items enclosed by square brackets ([ ]) cannot be restored.
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.
When you receive a warning that all selected items will be overwritten, type y and then press ENTER.
When prompted, type the user name and password for the database.
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.
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:
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.
Restore the last full database backup.
Restore the most recent differential database backup since the last full database backup.
Restore all transaction log backups since the last full or differential database backup.
Avertissement : |
---|
Recovery of the configuration database cannot be performed using this procedure. To restore the configuration database, see Restaurer une batterie de serveurs après une défaillance de la base de données de configuration (Office SharePoint Server). |
Important : |
---|
Membership in the dbcreator fixed server role is the minimum required to perform the following procedure. |
Restore an existing database
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:
In Microsoft Windows Server 2003, start the Services snap-in.
Under Services (local), click Windows SharePoint Services Timer.
Click Stop this service.
Verify that all running jobs are complete before continuing with this procedure.
Start SQL Server Management Studio and connect to the database server.
In Object Explorer, expand Databases.
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.
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.
In the Select a page pane, click Options.
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.
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.
Remarque : For more information about these recovery options, see Restore Database (Options Page) (https://go.microsoft.com/fwlink/?LinkId=114420&clcid=0x409).
Click OK to complete the restore operation.
Repeat steps 4 through 9 for each database that you are restoring.
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.
Voir aussi
Concepts
Sauvegarder et restaurer les bases de données (Office SharePoint Server)
Sauvegarder les bases de données (Office SharePoint Server)
Sauvegarder et restaurer des bases de données à l’aide de DPM (Office SharePoint Server)