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 only supports SharePoint 2016 and 2019 Server with the 64-bit version of Automate Desktop.
  • SharePoint-related error messages appearing in Automate Desktop are sent from your SharePoint site or server. Automate Desktop displays these messages verbatim. For information on SharePoint error messages, refer to Microsoft's SharePoint documentation.

Practical usage

Use 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

Server

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 icon to open the SharePoint Browser to navigate to the desired backup (.bak) file.
Default content database --- --- --- --- If selected, 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:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

This sample task restores a SharePoint site from a backup file.

Copy
<AMSHAREPOINT ACTIVITY="restore_site" SITEURL="http://server_name/sites/site_name" RESTOREURL="http://winserver3:9090" BACKUPFILE="C:/TEMP/MySharePointBackup.bak" CONTENTDATABASE="SQLServ3" />