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 download and extract a hosted feature layer 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 layer.
- Log in to the ArcGIS Online organizational account.
- Navigate to My Content, and browse to the desired hosted feature layer with attachments.
- Click the options icon next to the hosted feature layer to be downloaded, and select View item details. The item details page for the hosted feature layer displays.
- Scroll down to the bottom of the page to find the URL section, and click View. The ArcGIS REST Services Directory page displays.
- Scroll down to the bottom of the page, and click Create Replica. The page for Create Replica: (hosted feature layer name) displays.
- Specify the Replica Name. The name cannot contain any spaces.
- Specify Layers with the layer IDs to include in the replica. For example, if the service contains four layers, specify '0,1,2,3'.
- 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 large datasets:
- Return Attachments: True
- Create Replica Asynchronously: True
- Sync Model: none
- Attachments Sync Direction: bidirectional
- Data Format: FILEGDB
- Click Create Replica and then use one of the options below to download the file geodatabase. To get the output, extract the file geodatabase, which contains the features and attachments from the hosted feature layer.
- 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.
Click this URL to display the Replica Status page, and click Check periodically while the replica is created until a Result Url appears. Use the Result Url to download the zip file.