STSADM Command Line tool for Backup
Monday, 20 August 2012
Backup: Stsadm operation (Office SharePoint Server)
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.
|
|
|---|
|
The force and nositelock parameters were first introduced in Microsoft Office SharePoint Server 2007 with Service Pack 2 (SP2). |
|
|
|---|
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]
-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]
-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.
|
||
|
overwrite
|
<none> |
No |
To overwrite an existing backup file. |
||
|
directory
|
Any one of the valid paths:
|
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.
|
||
|
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).
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. |