Export Site

URL:
https://<root>/exportSite
Methods:
POST
Required Capability:
Access allowed only with the default administrator role
Version Introduced:
10.4

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.

File store request parameters

ParameterDetails

location

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

Example
1
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 request parameters

ParameterDetails

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
1
location=\\server\share\backup

backupObjectStore

The name of the backup bucket.

Example

Example
1
backupObjectStore="sampleBucket"

backupObjectStoreRegion

The AWS region the backup bucket is in.

Example

Example
1
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 request parameters

ParameterDetails

location

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

Example
1
location=\\server\share\backup

backupObjectStore

The URL for the backup Azure Blob container, which will have the following format:

1
2

https://<accountName>.blob.core.windows.net/<container>
Example
1
2

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

backupObjectStoreConnectionStr

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

Example
1
2
3
4
5
6

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

validate

Introduced at ArcGIS Enterprise 11.1. This parameter validates both the folder path and the Azure Blob container, ensuring that they are accessible before performing the exportSite operation. If set to true, the folder path and Azure 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 usages

Example one: file store

The following is a sample POST request for the exportSite operation that demonstrates validating the location for a file store:

1
2
3
4
5
6
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

Example two: AWS S3

The following is a sample POST request for the exportSite operation that demonstrates parameter configuration for AWS S3:

1
2
3
4
5
6
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

Example three: Azure Blob

The following is a sample POST request for the exportSite operation that demonstrates parameter configuration for Azure Blob:

1
2
3
4
5
6
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

Example one: file store

The following is a sample response returned for file stores:

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

Example two: AWS S3

The following is a sample response for AWS S3:

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

Example three: Azure Blob

The following is a sample response for Azure Blob:

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

Example four: success with warnings

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:

1
2
3
4
5
{
  "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  section in the Common Problems and Solutions documentation for more information."]
}

Examples with validation

Example one: success response

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:

1
2
3
{
  "status": "success"
}

Example two: failure response

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:

1
2
3
4
5
6
7
{
  "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
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close