Click to Rate and Give Feedback
TechNet
TechNet Library
Office
Technical reference
Stsadm operations
 Restore: Stsadm operation

  Switch on low bandwidth view
Restore: Stsadm operation (Office SharePoint Server)

Updated: 2008-07-15

Operation name: Restore

When the –url parameter is used, a restoration of the site collection is performed. However, when the –restoremethod parameter is used, a restoration of an individual database, Web application, or the entire farm can be performed. If you want to overwrite an existing site collection, use the overwrite parameter.

Syntax

For site collection restore

stsadm -o restore

   -url <URL name>

   -filename <file name>

   [-hostheaderwebapplicationurl] <Web application URL>

   [-overwrite]

For catastrophic restore

stsadm -o restore

   -directory <UNC path>

   -restoremethod <overwrite or new>

   [-backupid] <GUID from backuphistory, see stsadm -help backuphistory>

   [-item] <created path from tree>

   [-percentage] <integer between 1 and 100>

   [-showtree]

   [-suppressprompt]

   [-username] <user name>

   [-password] <password>

   [-newdatabaseserver] <new database server name>

   [-preservechangelog]

   [-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 restore file, such as "Siteres.bak"

Yes

Name of the restore file

hostheaderwebapplicationurl

A valid URL assigned to the Web application by using Alternate Access Mapping (AAM), such as "http://server_name"

No

Restores a site collection as a host-named site collection rather than a path-based site collection. When the -hostheaderwebapplicationurl parameter is present, the value of the -url parameter is the URL of the host-named site collection and value of the -hostheaderwebapplicationurl parameter is the URL of the Web application that will hold the host-named site collection.

overwrite

<none>

No

To overwrite an existing restore file

directory

Any one of the valid paths:

  • C:\folder_name

  • \\server_name\folder_name

NoteNote:
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.

restoremethod

Any one of the following:

  • Overwrite

  • New

Yes

The restore method of the backup file. The values are overwrite or new. The overwrite value restores the content and settings to their original location. If the overwrite value is used, a confirmation prompt is displayed. To suppress the prompt, use the suppressprompt parameter.

The new value specifies a new location to restore the content (for example, a new database server).

backupid

A valid GUID, such as "12345678-90ab-cdef-1234-567890abcdef"

GUID of the backup package that should be restored. Each backup package has a unique GUID associated with it and can be seen by viewing the backup history by using the stsadm -o backuphistory operation. If this parameter is absent, the most recent full backup package will be used.

item

A valid item, such as:

Web Application\SharePoint-80

No

Indicates which part of the farm should be restored. 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. Surround the item or path in double quotation marks if it contains a space. If this parameter is absent, all items in the backup package will be restored.

percentage

An integer value between 1 and 100.

The default value is 5.

No

Requests restore operation progress updates to be displayed in increments of that percentage (for example, a value of “5” will display restore progress updates at 5% completed, and a value of "10" will display at 10% completed).

NoteNote:
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.

showtree

<none>

No

Displays which objects in the farm will be restored based on the other parameters passed to the restore operation, namely the -item parameter. Items that will be excluded from the restore based on the other parameters passed to the restore operation will be preceded with an asterisk character (*). Items that cannot be restored will be enclosed in square brackets ([ ]). A restore will not be performed if the showtree parameter is present

suppressprompt

<none>

No

Prevents the following command-line prompt from being displayed:

“Warning: All selected items will be overwritten. Do you want them to be overwritten (Y/N)?"

This parameter is valid only when the value of the restoremethod parameter is set to overwrite.

username

A valid SQL authentication user name in the form: username

No

The SQL Server 2005 login name that has sufficient permission in SQL Server to restore the database. This parameter is only necessary if using SQL authentication.

password

No

The password of the username account that has sufficient permission in SQL Server to restore the database. If the -username parameter is supplied, but the -password parameter is not supplied, you will be prompted to enter the password.

newdatabaseserver

A valid database server name, such as "SQLBE1"

No

Indicates the instance name of SQL Server 2005 that should be used when restoring any databases when the value of the -restoremethod parameter is “New.” This parameter is not valid when the value of the -restoremethod parameter is “Overwrite.”

By default, you are asked for a new database server name for each database.

preservechangelog

<none>

No

Preserves the change log so the next crawl of this content database is not a full crawl. This parameter was first introduced in the Infrastructure Update for Microsoft Office Servers. For more information, see Remarks.

quiet

<none>

No

Suppresses the output of restore progress information to the display window. The final restore status (“Operation completed successfully.”) will still be displayed. If the -quiet parameter is absent, the restore operation will display progress information to the display window as it restores the package.

Remarks

If you are running the Infrastructure Update for Microsoft Office Servers, the identifier (ID) of each content database is retained when you restore or reattach the database by using built-in tools. Default change log retention behavior when using built-in tools is as follows:

  • The change logs for all databases are retained when you restore a farm.

  • The change log for a content database is retained when you reattach the database.

  • The change log for a content database is NOT retained when you restore just the content database. It is in this case that you would use the preservechangelog parameter.

When a database ID and change log are retained, Search continues crawling based on the regular schedule defined by crawl rules. When a change log is not retained, Search performs a full crawl during the next scheduled crawl.

For more information, see Move content databases (Office SharePoint Server 2007) and Back up and restore an entire farm (Office SharePoint Server 2007).

When you restore an existing database and do not use the –restoremethod parameter with the overwrite option with the stsadm –o restore command, a new ID is assigned to the restored database, and the database change log is not preserved. The next crawl of the database will fully index the content database.

If a restore is performed and the ID in the backup package is already in use in the farm (for example, you are attempting to split a database in two), a new ID is assigned to the restored database and a warning is added to the restore log. The ability to perform an incremental crawl instead of a full crawl is dependent on the content database ID being the same as before and the change log token used by search being valid for the current change log in the content database. If the change log is not preserved, then the token will not be valid and search will have to perform a full crawl.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
typo      paisleygo_hotmail.com ... Thomas Lee   |   Edit   |   Show History
Re:

url

A valid URL, such as "http://server_name"

Yes

URL of the site collection that you want to back up


is it the url of the site you want to Back-up? or the site you want to restore?????
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker