SharePoint - Restore Site
Declaration
<AMSHAREPOINT ACTIVITY="restore_site" SITEURL="text" RESTOREURL="text" BACKUPFILE="text" CONTENTDATABASE="text" />
Description: Restores a site that has been previously backed up.
Practical Usage
Used to restore a backup of a site. You can restores a site collection from a backup onto a separate URL or overwrite an existing site collection URL while specifying that the site collection must be stored in a specific content database.
Connection Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Site |
Text |
Yes |
(Empty) |
SITE="http://myServer/tech" |
The SharePoint site to restore. |
Restore URL |
Text |
Yes |
(Empty) |
URL=" http://server/site_name " |
The URL location in which to restore the site. |
Overwrite if site exists |
Yes/No |
No |
No |
OVERWRITE="NO" |
If set to YES, a matching restore URL location will be overwritten with the contents of the backup. If set to NO, matching URLs will not be overwritten, however, a runtime error will occur as a result. |
Backup file |
Text |
Yes |
(Empty) |
BACKUPFILE="c:\backup\site.bak" |
The backup file to restore. Click the folder icon to open the SharePoint Browser allowing for easy navigation to the desired backup (.bak) file. |
Default content database |
--- |
--- |
--- |
--- |
If enabled, the site collection will be restored in the default content database. This is a visual parameter only used during design time, therefore, contains no markups. Enabling this parameter automatically disables the Specific content database parameter. |
Specific content database |
Text |
No |
(Empty) |
CONTENTDATABASE="SQLBE1" |
If enabled, specifies the content database (other than the one set as default) in which to restore the site collection. Enabling this parameter automatically disables the Default content database parameter. |
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description: Restore sharepoint site "http://server_name/sites/site_name" to "http://winserver3:9090". Backup file is "C:/TEMP/MySharePointBackup.bak".
<AMSHAREPOINT ACTIVITY="restore_site" SITEURL="http://server_name/sites/site_name" RESTOREURL="http://winserver3:9090" BACKUPFILE="C:/TEMP/MySharePointBackup.bak" CONTENTDATABASE="SQLServ3" />