Skip To Content

Import Site

  • URL:https://<admin-root>/importSite(POST only)
  • Required Capability:Administrator
  • Version Introduced:10.8

Description

Caution:

This administrative operation is not available when accessed through a Web Adaptor. This operation should be accessed using a direct URL to one of the GIS servers on the site.

This operation imports a site configuration into the currently running site. Importing a site means replacing all site configurations (including GIS services, security configurations, and so on) of the currently running site with those contained in the site configuration file you supply as input. The input site configuration file can be obtained through the exportSite operation.

This operation will restore all information included in the backup, as noted in exportSite. When it is complete, this operation returns a report as the response. You should review this report and fix any problems it lists to ensure your site is fully functioning again.

The importSite operation lets you restore your site from a backup that you created using the exportSite operation. Note that the importSite operation uses the server directory paths from the exported configuration. Therefore, these paths must be available for the importSite operation to complete successfully.

Caution:

This operation is computationally expensive and can run for a long duration. Manual intervention may be required at the end of this operation to address any highlighted problems. Since this operation changes the site configuration completely, it is highly recommended that you do not access GIS services and administer the site while this operation is running.

Request parameters

ParameterDetails
location

A file path to an exported configuration or an ID referencing the stored configuration on the server.

Example

location=i5fad5582-80bc-4155-a21c-62f326354aba
f

The response format. The default response format is html.

Values: html | json

Example usage

Below is a sample POST request for importSite:


POST /arcgis/admin/importSite HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

location=i5fad5582-80bc-4155-a21c-62f326354aba&f=json

JSON Response example

The response highlights the server's failure to start a service during the import operation. For demonstration purposes, a service's input data path was edited to point to a non-existent file before exporting the site. The same exported configuration file was supplied as input to the importSite operation. importSite completes and the response warns that a service could not be started during the importSite operation because of a bad file path. Using this information you should be able to fix the issue by editing the data path of the service and starting it again.


{
  "status": "success",
  "result": [
    {
      "source": "SITE",
      "messages": [
        {
          "level": "INFO",
          "message": "This operation completed in 1.52 mins"
        }
      ]
    },
    {
      "source": "SERVICES",
      "messages": [
        {
          "level": "WARNING",
          "message": "SampleWorldCities.MapServer=Startup state of service 'SampleWorldCities.MapServer' 
            on machine 'MSCONFIG.ESRI.COM' was FAILED. Can not open file path/to/data/WorldCities.ms. 
            The system cannot find the file specified. Probable cause: The file is inaccessible to Server.\n",
          "details": {
            "service": "SampleWorldCities.MapServer",
            "state": "FAILED",
            "message": "",
            "machines": [
              {
                "machine": "MSCONFIG.ESRI.COM",
                "state": "FAILED",
                "reports": [
                  {
                    "state": "FAILED",
                    "message": " Can not open file path/to/data/WorldCities.ms.
                      The system cannot find the file specified. Probable cause: The file is inaccessible to Server."
                  }
                ]
              }
            ]
          }
        }
      ]
    }
  ]
}