Skip To Content
ArcGIS Developers
Dashboard

Export Site

Description

This operation exports the portal site configuration to a location you specify. The exported file includes the following information:

  • Content directory—The content directory contains the data associated with every item in the portal.
  • Portal database—A snapshot of the portal database that stores users, groups, items, and other information about the portal.

Caution:

You cannot make other administrative site configuration changes while a backup is in progress.

Request parameters

File store parametersDetails
location

A path to a folder accessible to the portal where the exported site configuration will be written.

Example

location=\\server\share\backup
f

The response format. The default response format is html.

Values: json | html | pjson

AWS S3 parametersDetails
location

A path to the location where the exported site configuration will be created. The backup file written to this location will contain a pointer to the Backup Bucket Name and Backup Bucket Region parameters.

Example

location=\\server\share\backup
backupObjectStore

The name of your Backup Bucket.

Example

backupObjectStore="sampleBucket"
backupObjectStoreRegion

The AWS region your Backup Bucket is in.

Example

backupObjectStoreRegion="us-east-1"
f

The response format. The default response format is html.

Values: json | html | pjson

Azure Blob parametersDetails
location

A path to a folder accessible to the portal where the exported site configuration will be written.

Example

location=\\server\share\backup
backupObjectStore

The URL for the backup Blob container, which will have the format <https://<accountName>.blob.core.windows.net/<container>.

Example

backupObjectStore=https://sampleserver.blob.core.windows.net/mycontainer
backupObjectStoreConnectionStr

A string that stores the connection information for the Blob container. Include the parameters accountKey, accountName, and optionally accountEndpoint (if connecting to storage services in different regions).

Example

backupObjectStoreConnectionStr={"accountName": "myaccountName","accountKey": "myAccountKey","accountEndpoint": "accountEndpoint"}
f

The response format. The default response format is html.

Values: json | html | pjson

Example usage

Below is a sample POST request for exportSite for file store:

POST /webadaptor/portaladmin/exportSite HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

location=\\server\share\backup&f=json

Below is a sample POST request for exportSite for AWS S3:

POST /webadaptor/portaladmin/exportSite HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

location=\\server\share\backup&backupObjectStore="sampleBucket"&backupObjectStoreRegion="us-east-1"&f=json

Below is a sample POST request for exportSite for Azure Blob, formatted for readability:

POST /webadaptor/portaladmin/exportSite HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

location=\\server\share\backup&backupObjectStore=https://sampleserver.blob.core.windows.net/mycontainer&backupObjectStoreConnectionStr={
  "accountName": "myaccountName",
  "accountKey": "myAccountKey",
  "accountEndpoint": "accountEndpoint"
}&f=json

JSON Response examples

Example response for file store:

{
  "status": "success",
  "location": "\\server\share\backup\Oct-06-2017_10-20-55.portalsite"
}

Example response for AWS S3:

{
  "status": "success",
  "location": "\\server\share\backup\Oct-06-2017_10-20-55.portalsite"
}

Example response for Azure Blob:

{
  "status": "success",
  "location": "\\server\share\backup\Oct-06-2017_10-20-55.portalsite"
}

Starting at 10.8, if items are missing from the content directory, but exist in the portal's internal database, the request will return a "success with warning" response that contains a message that outlines the reason for the warning:

{
  "status": "success with warning",
  "location": "\\server\share\backup\Aug-06-2019_10-20-55.portalsite",
  "messages": ["During the export operation, some items could not be exported because they appear to be missing from the content directory. Check the logs and review the Why do I receive an error about a missing item when creating a backup of my portal? section in the Common Problems and Solutions documentation for more information."]
}