English

How To: Retrieve attachments from a hosted feature service

Summary

Backing up ArcGIS Online data is a recommended practice because any content deleted from an organization is permanently removed and cannot be recovered. 
The instructions provided describe how to retrieve and extract a hosted feature service with attachments to save individual copies of the data to a local machine.

Procedure

Follow the steps provided to create a replica (a file geodatabase) from the REST endpoint of the service to save attachments from a hosted feature service.

  1. Log in to the ArcGIS Online organizational account.
  2. Navigate to My Content, and browse to the desired feature service with attachments.
  3. Click the small arrow icon next to the feature service with the attachments to be retrieved, and select View item details. The item details page for the hosted feature service displays.
    The item details page
  4. Scroll down to the bottom of the page to find the URL section, then click View. The ArcGIS REST Services Directory page displays. 
    User-added image
  5. Scroll down to the bottom of the page, and click Create Replica. The page for Create Replica: (feature service name) displays.
    Operation Create Replica
  6. Specify the Replica Name. The name cannot contain any spaces.
  7. Specify Layers with the layer IDs to include in the replica. For example, if the service contains 4 layers, specify '0,1,2,3'.
  8. Set the following parameters accordingly based on the size of datasets.
    For small datasets:
    • Return Attachments: True
    • Sync Model: none
    • Attachments Sync Direction: bidirectional
    • Data Format: FILEGDB
    For small datasets
    For large datasets:
    • Return Attachments: True
    • Create Replica Asynchronously: True
    • Sync Model: none
    • Attachments Sync Direction: bidirectional
    • Data Format: FILEGDB
    For large datasets
  9. Click the Create Replica button. With parameters used for small datasets, a responseUrl appears when the replica has finished being created, and can be clicked to download the zip file. With parameters used for large datasets, a statusURL displays at the bottom of the screen.
    Status URL
    Click this URL to display the Replica Status page, then click Check periodically while the replica is created until a Result Url appears. Use the Result Url to download the zip file.Result URL
  10. To get the output, extract the file geodatabase. This contains the features and attachments from the hosted feature service.

Related Information