Skip To Content

Export Site

Description

The exportSite operation exports the portal site configuration to a specified location. 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.

Precaución:

You cannot make other administrative site configuration changes while a backup is in progress. Before performing the exportSite operation, ensure that all site configurations have been made.

Request parameters

File store parametersDetails
location

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

Example

location=\\server\share\backup
validate

Introduced at ArcGIS Enterprise 11.1. The This parameter validates the folder path specified in the location parameter, ensuring that it is accessible before performing the exportSite operation. If set to true, the path will be validated, and the operation will return either a success response or an error message. The default value is false.

Values: true | false

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 backupObjectStore and backupObjectStoreRegion parameters.

Example

location=\\server\share\backup
backupObjectStore

The name of the backup bucket.

Example

backupObjectStore="sampleBucket"
backupObjectStoreRegion

The AWS region the backup bucket is in.

Example

backupObjectStoreRegion="us-east-1"
validate

Introduced at ArcGIS Enterprise 11.1. This parameter validates both the folder path and the backup bucket, ensuring that they are accessible before performing the exportSite operation. If set to true, the path and backup bucket will be validated, and the operation will return either a success response or an error message. The default value is false.

Values: true | false

f

The response format. The default response format is html.

Values: json | html | pjson

Azure Blob parametersDetails
location

A folder path, 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 accountKey and accountName parameter values, and optionally the accountEndpoint parameter value (if connecting to storage services in different regions).

Example

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

Introduced at ArcGIS Enterprise 11.1. This parameter validates both the folder path and the BLOB container, ensuring that they are accessible before performing the exportSite operation. If set to true, the folder path and BLOB container will be validated, and the operation will return either a success response or an error message. The default value is false.

Values: true | false

f

The response format. The default response format is html.

Values: json | html | pjson

Example usage

The following is a sample POST request for the exportSite operation that demonstrates validating the location for a 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&validate=true&f=json

The following is a sample POST request for the exportSite operation that demonstrates parameter configuration 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

The following is a sample POST request for the exportSite operation that demonstrates parameter configuration 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

Examples without validation

The following is a sample response returned for file stores:


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

The following is a sample response for AWS S3:


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

The following is a sample response for Azure Blob:


{
  "status": "success",
  "location": "\\server\share\backup\Oct-06-2022_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-2022_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."]
}

Examples with validation

The sample response below is for a request that had the validate parameter set to true. This example demonstrates a success response, meaning that the path was accessible to Portal for ArcGIS:


{
  "status":"success"
}

The sample response below is for a request that had the validate parameter set to true. This example demonstrates a failure, meaning that the path was not accessible to Portal for ArcGIS:


{
  "error" : {
    "code" : 500,
    "message" : "Unable to write to \\server\share\backup. Verify the location is accessible and the service account running Portal for ArcGIS can write to it.",
    "details" : null
  }
}