Export Site

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

Description

The exportSite operation exports the site configuration to a specified location. The exported file includes, and excludes, the following information:

Information included in the backupInformation not included
  • Service configurations and service properties
  • Service webhooks
  • Server object extensions (SOEs)
  • Server object interceptors (SOIs)
  • Registered data store item locations
  • Registered relational data store types
  • User and role information
  • List of machines in the site
  • Log settings
  • Statistics reports
  • Scene tile cache configuration files under arcgiscache/Hosted
  • Cache tiles and tiling schemes
  • Data used by services (unless it was copied to a folder on the server automatically at publish time)
  • Dynamically generated map images and other temporary output
  • Log messages (including geoprocessing job statuses and messages)
  • Primary site administrator name and password
  • Statistics data
  • ArcGIS Web Adaptor configurations

Protecting information not included in the backup

As noted above, some information is not included in the backup of your site. It's recommended you manually back up this information at the same time you run the backup utility. When you restore the site, manually copy or move this information back to the site, for example:

These directories will contain the cache tiles and the tiling scheme file conf.xml. The cache directories may also contain a file geodatabase status.gdb that contains information about which tiles have been built. When you restore the site, move or copy the information back to the original arcgiscache directory.

Request parameters

ParameterDetails

location

(Optional)

A folder path, accessible to ArcGIS Server, where the exported site configuration will be written. If the location parameter is not specified, the server writes the exported site configuration file to a directory owned by the server and returns a virtual path (HTTPS URL) to the directory. The exported site configuration can be downloaded from the directory by accessing the returned URL.

Example
Use dark colors for code blocksCopy
1
location=\\server\share\backup

validate

Introduced at ArcGIS Enterprise 11.1. 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: html | json | pjson

Example usages

The following is a sample POST request for the exportSite operation that demonstrates defining the location parameter and validating that it is accessible:

Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /webadaptor/admin/exportSite HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

location=\\server\share\backup&validate=true&f=pjson

The following is a sample POST request for the exportSite operation that demonstrates leaving the location parameter undefined:

Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /webadaptor/admin/exportSite HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

location=&validate=false&f=pjson

JSON Response examples

Examples without validation

The following is a sample response for a request that defined the location parameter:

Use dark colors for code blocksCopy
1
2
3
4
{
  status: "success",
  location: "\\server\share\backup\Jan-15-2023_11-50-33.agssite"
}

The following is a sample response for a request that did not define the location parameter.

Use dark colors for code blocksCopy
1
2
3
4
{
  status: "success",
  location: "https://machine.domain.com/webadaptor/admin/uploads/i33d579b6-d8a8-4886-a1bc-671ae52e7a00"
}

Examples with validation

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

Use dark colors for code blocksCopy
1
2
3
{
  "status": "success"
}

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

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "status": "error",
  "messages": ["Unable to write to \\server\share\backup. Verify the location is accessible and the service account running ArcGIS Server can write to it."],
  "code": 500
}

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