Backup : opération Stsadm (Office SharePoint Server)
Mise à jour : 2009-04-28
Operation name: Backup
When the url parameter is used, a backup of the site collection is created. However when the backupmethod parameter is used, a backup of an individual database, Web application, or the entire farm can be created. If you want to overwrite an existing backup file for a site collection only, use the overwrite parameter.
Remarque : |
---|
The force and nositelock parameters were first introduced in Microsoft Office SharePoint Server 2007 avec Service Pack 2 (SP2). |
Important : |
---|
If changes are made to the site collection during the backup process, the backup can become corrupted. Backing up large site collections can take a long time. To reduce the chance that user activity will interfere with a site collection backup, or that the time that is required to back up large site collections will exceed the available maintenance window, follow these recommendations:
|
Syntax
For site collection backup
stsadm -o backup
-url <URL name>
-filename <file name>
[-nositelock]
[-overwrite]
For catastrophic backup
stsadm -o backup
-directory <UNC path or local drive>
-backupmethod <full or differential>
[-force]
[-item] <created path from tree>
[-percentage] <integer between 1 and 100>
[-backupthreads] <integer between 1 and 10>
[-showtree]
[-quiet]
Parameters
Parameter | Value | Required? | Description |
---|---|---|---|
url |
A valid URL, such as "http://*server_name*" |
Yes |
URL of the site collection that you want to back up |
filename |
A valid file name for the site collection backup file, such as "Siteb.bak" |
Yes |
Name of the backup file |
nositelock |
<none> |
No |
Specifies that the site collection lock during a site collection backup is not set to read-only. Notes This parameter was first introduced in Microsoft Office SharePoint Server 2007 avec Service Pack 2 (SP2). |
overwrite |
<none> |
No |
To overwrite an existing backup file. |
directory |
Any one of the valid paths:
Notes The spbr* folders are automatically created. |
Yes |
The path where Microsoft Office SharePoint Server 2007 should store the backup package it generates. If you have a computer that has Microsoft SQL Server 2005 and an instance of Office SharePoint Server 2007 installed, you can use local drive paths. This would include a basic installation. However, if SQL Server 2005 and Office SharePoint Server 2007 are installed on multiple computers, you must use Universal Naming Convention (UNC) share paths so that the SQL database and search components are written to the same location (for example, \\*computer_name*\volume\Backup). Multiple backup packages can be stored in the same location. This is the same path that you would pass to the -directory parameter of the stsadm -o restore operation. |
backupmethod |
Any one of the following:
|
Yes |
Type of backup file to be created. The values are full or differential. A full backup is a backup of all the selected data. A differential backup is a backup of all the selected data that has changed since the last full backup. |
force |
<none> |
No |
Ignores the disk space check and proceeds with the backup. Notes This parameter was first introduced in Microsoft Office SharePoint Server 2007 avec Service Pack 2 (SP2). |
item |
A valid item, such as: Web Application\SharePoint-80 |
No |
Indicates which part of the farm should be backed up. You might use the full farm path notation as displayed by the -showtree parameter or the name of the target component in the path if it has a unique name. If there are multiple items within the same match, the full path must be provided. By default, the top node is selected. Surround the item or path in double quotation marks if it contains a space. If this parameter is absent, the entire farm is backed up. |
percentage |
An integer value between 1 and 100; the default value is 5 |
No |
Requests backup operation progress updates to be displayed in increments of that percentage (for example, a value of "5" will display backup progress updates at 5 percent completed, and a value of "10" will display backup progress updates at 10 percent completed). Notes This percentage is not precise and the actual progress updates might be lower or greater than requested. For a very large database, 1 is the optimal value that you should use to see some updates displayed. The default value is 5. |
backupthreads |
An integer value between 1 and 10 |
No |
The number of threads that should be used during the backup. For Windows SharePoint Services, the recommended value is 3 threads. The default value is 1. The fewer the threads, the easier it is to read and understand the backup log file. |
showtree |
<none> |
No |
Displays which objects in the farm will be backed up based on the other parameters passed to the backup operation, namely the -item parameter. Items that will be excluded from the backup based on the other parameters passed to the backup operation will be preceded with an asterisk character (*). Items that cannot be backed up will be enclosed in square brackets ([ ]). A backup will not be performed if the showtree parameter is present. |
quiet |
<none> |
No |
Suppresses the output of backup progress information to the display window. The final backup status ("Operation completed successfully.") will still be displayed. If the -quiet parameter is absent, the backup operation will display progress information to the display window as it backs up the package. |