SharePoint - Restore site

Declaration

<AMSHAREPOINT ACTIVITY="restore_site" SITEURL="text" RESTOREURL="text" BACKUPFILE="text" CONTENTDATABASE="text" />

Related Topics    

Description

Restores a site that has  been previously backed up.

NOTE: This activity is only supported on SharePoint 2013 Server with the 64 bit version of Automate and Automate Enterprise. In addition, the user account that is performing this procedure must have the site collection administrator permission.

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.

Parameters

Connection

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 selected, a matching restore URL location will be overwritten with the contents of the backup. If disabled, 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.

 

Description

Error Causes

On Error

Example

NOTE:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

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" />