Skip To Content

Recover an ArcGIS Data Store

If you lose access to the data in a data store—for example, an ArcGIS Data Store machine crashes or an editor deletes the wrong data from a hosted feature layer—you can restore the data using backup files.

If one or more of the machines in a data store crashes and cannot be recovered, install ArcGIS Data Store on a new machine and restore the latest available full backup to the new machine using the restoredatastore utility.

Note:

To discover which backup files you can use to restore, run the listbackups utility.

How you restore the data store will vary depending on the type of data store and how many or which machines you're replacing. The following are examples of some of these differences:

Important information about restoring data stores

Keep the following information in mind regarding ArcGIS Data Store recovery:

  • You must ensure that your backup and restore procedures work by testing them on development or test deployments. You don't want to discover a flaw in your workflow when you need to restore a production deployment.
  • The backup files you use for recovery are compressed. When you restore data, these files must be uncompressed to a staging location. That means you must have a staging location that can accommodate this data. By default, the files are staged in the ArcGIS Data Store data directory. If you have a lot of data in the relational or tile cache data store, you can set up a separate staging location and specify that location to stage files for data store recovery. Specify the separate staging location using the changestaginglocation utility.
  • Before you run the restoredatastore utility, ensure that no one is publishing or editing layers. These new services and edits will be lost, as they are not included in the backup file you are restoring.
  • Clients and services cannot access existing data in the data store while you are restoring it.
  • When you deploy ArcGIS Enterprise on-premises but your data store backup files are in cloud storage, creating backups and restoring from those backups will take longer than when backup files are stored in local file shares.

Restore the relational data store or tile cache data store (primary-standby mode) after a crash

If the hardware stops functioning or the data store is unavailable and cannot be brought back online for a single-machine relational data store or a tile cache data store (running in primary-standby mode), install ArcGIS Data Store on a new machine and apply the backup files to the new installation using the restoredatastore utility. This re-creates the data store on the new machine and keeps the data store registered with the existing GIS Server site.

Tip:

If the primary machine in a primary-standby deployment of a relational data store or tile cache data store fails, the standby machine becomes the primary machine. Remove the failed machine from the deployment. Then you can install ArcGIS Data Store on a new machine and configure it as the standby machine. You do not need to restore from a backup file because the data will replicate from the primary machine to the standby machine. Similarly, if a standby machine fails and cannot be recovered, you do not need to restore data. Remove the standby machine from the deployment, install ArcGIS Data Store on a new machine, and configure it as the standby machine.

To restore a single-machine relational or tile cache data store, complete the following steps:

  1. Install ArcGIS Data Store on a new machine.

    Do not proceed with configuration. Close the Data Store configuration wizard when it opens at the end of the installation.

  2. Open a command prompt using the Run As Administrator option.
  3. Run the restoredatastore utility from <ArcGIS Data Store installation directory>\datastore\tools to restore the most recent backup of the relational, graph, or tile cache data store.

    See the utility reference or type --help at the command line for syntax.

    This example restores the most recent backup of a relational data store from \\fortknox\backups\datastore\relational to C:\arcgisdatastore. Because the data store remains bound by default to the GIS Server site with which it was registered, you do not need to specify --bound true, but you do need to specify the GIS Server site URL and administrator credentials as shown below.

    restoredatastore --store relational --target most-recent --source-loc \\fortknox\backups\datastore\relational --data-dir C:\arcgisdatastore --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password MySApw

    If the directory you specify with the --data-dir option does not already exist, the directory will be created. If it does exist, you must have write access to it and it must be empty. If not, the restore operation will fail.

  4. Confirm that you want to restore the data store by typing Yes.

Restore the existing relational data store to a specific point in time

If the relational data store is configured for point-in-time recovery, you can use backup files to restore the relational data store to a point in time that you specify. For example, if an editor makes extensive edits to data in a hosted feature layer and discovers the next day that those edits were incorrect, you can restore the relational data store to the state it was in before those edits were made.

Times specified must be in coordinated universal time (UTC).

Note:

Any feature layers published to the portal after the point in time to which you restore the relational data store will no longer be valid, because the data used by those layers will no longer exist in the data store.

If you disabled automatic backups, you cannot restore to a specific point in time.

To restore a relational data store to a specific point in time, complete the following steps:

  1. Open a command prompt using the Run As Administrator option.
  2. Run the restoredatastore utility from <ArcGIS Data Store installation directory>/datastore/tools to restore the data to a specific point in time.

    The syntax to restore the relational data store to a specific point in time is as follows:

    restoredatastore --store relational --target <date and time> --server-url <ArcGIS Server URL> --server-admin <ArcGIS Server admin user> --server-password <ArcGIS Server admin password>

    For example, type the following to restore the relational data store from files to the state it was in at 5:00 p.m. UTC on March 20, 2014:

    restoredatastore --store relational --target 2014-03-20-17:00:00 --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password MySApw
    
    You are going to restore the data store from a data store backup. This process could take a long time, 
    depending on the size of your data. Please do not interrupt the process once it has started.
    
    Do you want to continue (Yes or No)? Yes

  3. Confirm that you want to restore the data store by typing Yes.
    Tip:

    To script the restoredatastore utility, include a flag to suppress the confirmation prompt as in the following example:

    restoredatastore --store relational --target 2014-03-20-17:00:00 --prompt no

    The hosted feature layer data is restored to the point in time you specified.

Restore a clustered tile cache data store to redistribute scene cache data after a crash

If a machine in a tile cache data store running in cluster mode crashes and you cannot bring it back online, replace the lost machine and restore the tile cache data store to the new machine. When you restore the data, ArcGIS Data Store redistributes copies of the scene cache data across all machines in the data store, including the new machine.

To detect and replace a failed tile cache data store machine and restore to redistribute scene cache data for high availability, complete the following steps:

  1. If you suspect there is a problem with one of your tile cache data store machines, run the describedatastore utility to confirm that a machine is inaccessible.
  2. If this indicates a problem with a machine, attempt to recover the machine.

    For example, if a network or power cable is unplugged, plug it in and start the machine.

  3. If you can recover the machine, bring it back online and run the describedatastore utility again to confirm that the machine is back online and participating in the tile cache data store.

    Do some tests of the scene layers to ensure that they are accessible. If they are, the recovery was successful. However, if you cannot recover the machine, proceed to the next step.

  4. Run the removemachine utility with the --force option to remove the failed machine from the tile cache data store.

    In the example below, the machine tilecache3 is inaccessible and cannot be recovered. Because ArcGIS Data Store cannot access the machine, you must specify --force true to remove the machine from the tile cache data store.

    removemachine tilecache3 --store tilecache --force true

  5. Obtain a new machine with the same operating system as the old machine, install ArcGIS Data Store on it, and add it to the existing tile cache data store by configuring it with the same hosting ArcGIS Server site.
  6. Run the ArcGIS Server validate REST command to confirm that the existing scene cache data is highly available.

    If you receive a message that there is only one copy of one or more of the scene layer caches, proceed with the remaining steps.

  7. Confirm that the tile cache data store has a shared backup location configured. If it doesn't, configure the backup location now.
  8. Ensure that no one publishes or updates any scene layers or is building any scene caches.

    To detect if a scene cache is being built or rebuilt, sign in to ArcGIS Server Manager for the hosting server, open Site > Jobs, choose System/SceneCachingControllers from the Services drop-down list, and click Query. If the server is building scene caches, the job statuses appear when you query. Do not proceed until these cache jobs complete. If no scene cache jobs are listed, you can proceed.

    To ensure that no one publishes new layers or edits, you can place ArcGIS Enterprise in read-only mode. However, this setting affects everyone using the portal.

  9. Create a backup of the tile cache data store.

    In the example below, a backup file named myscenecachebu is created and stored in a backup location in an Amazon Simple Storage Service (S3) bucket you registered as a backup location for the tile cache data store.

    backupdatastore myscenecachebu --store tilecache --location type=s3;location=mys3bucket

  10. Use the restoredatastore utility with the replicatedata option set to true to overwrite the contents of the tile cache data store and rebalance the content across all the machines.

    In the following example, the myscenecachebu file is used to restore the tile cache data store, and the replicatedata option is set to true to indicate to ArcGIS Data Store that two copies of each scene cache should be distributed across all machines in the tile cache data store:

    restoredatastore --store tilecache --target myscenecachebu --serverurl https://gisserver.example.com:6443 --server-admin myadmin --server-password myAdminPWd! --replicatedata true

  11. If you placed ArcGIS Enterprise in read-only mode, put it back in read-write mode.
  12. Run the validate command again to ensure that there are two copies of all scene caches.

Restore a data store after loss of all machines

If you need to replace all the machines in a tile cache data store, spatiotemporal big data store, object store, or graph store—for example, a flood destroys your data center—complete the following steps to restore the data store:

  1. As the administrator of the hosting server, sign in to the ArcGIS Server Administrator Directory for the hosting server and run unregisterItem operation to unregister the lost data store.

    You must unregister the data store; otherwise, restoring as described below will fail.

  2. Install ArcGIS Data Store on a new machine.

    Do not proceed with configuration. Close the Data Store configuration wizard when it opens at the end of the installation.

  3. Open a command prompt using the Run As Administrator option.
  4. Run the restoredatastore utility from <ArcGIS Data Store installation directory>\datastore\tools and include the --loaddata operation set to false to prepare the first machine for restoring the graph store, object store, tile cache data store, or spatiotemporal big data store.

    See the utility reference or type --help at the command line for syntax.

    This example prepares the new machine to restore the most recent backup of a spatiotemporal big data store from \\myserver\backups\spatiotemporal to C:\arcgisdatastore. The --loaddata operation is set to false so the data is not yet loaded.

    restoredatastore --store spatiotemporal --target most-recent --source-loc \\myserver\backups\spatiotemporal --data-dir C:\arcgisdatastore --loaddata false --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password MySApw

    If the directory you specify with the --data-dir option does not exist, it will be created. If it does exist, you must have write access to it and it must be empty. If not, the restore operation will fail.

  5. Install ArcGIS Data Store on additional machines and run the Data Store configuration wizard or the configuredatastore utility on each to add machines to the hosting server.

    You must use the configuredatastore utility if you're adding machines to a tile cache data store or a graph store.

  6. Run the restoredatastore utility again without the --loaddata option or with --loaddata set to true to restore all the data.

    Data will be distributed across all data store machines for the specific data store type that you restored.

    This example restores the data to the newly configured spatiotemporal big data store using the same backup file (on \\myserver\backups\spatiotemporal). The --loaddata option is set to true by default, so you don't need to specify it when you load the data.

    restoredatastore --store spatiotemporal --target most-recent --source-loc \\myserver\backups\spatiotemporal --data-dir C:\arcgisdatastore --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password MySApw

Restore the graph store cluster after two machines fail

If two machines in the graph store cluster fail and cannot be recovered, you must replace the graph store cluster.

Follow these steps to restore the graph store after two machines fail:

  1. On the remaining graph store machine, open a command prompt using the Run As Administrator option.
  2. Run the unregisterdatastore command from <ArcGIS Data Store installation directory>\datastore\tools to unregister the graph store from the hosting server.

    unregisterdatastore --stores graph

  3. Caution:

    You can reuse the one graph store machine that did not fail, but doing so requires you to rename and re-create the ArcGIS Data Store content directory. That means that if other ArcGIS Data Store types are running on the machine, you must also unregister and restore those data stores.

    It is recommended that you do not run multiple ArcGIS Data Store types on the same machine. If at all possible, restore the graph store to a new set of machines that are not shared with other ArcGIS Data Store installations.

    However, if you must continue to run the graph store on a machine with other ArcGIS Data Store types, you must ensure you have recent backups of all the data store types before you proceed. If you do not have backups for the other data store types, or if you do not want to unregister and restore the other data store types, you cannot reuse this machine as part of the new graph store cluster.

    If you will restore to three new machines, you can proceed to step 6. If you will reuse the remaining graph store machine, proceed to step 3.

  4. If other ArcGIS Data Store types are present and you will reuse the graph store machine, run the unregisterdatastore utility to unregister those data store types now.
    Note:

    Depending on the type of data store, you may need to run the removemachine utility to remove other machines in the additional data store types before you can unregister it.

  5. To reuse the remaining graph store machine, follow the steps below to rename the content directory, and then proceed to step 6.
    1. Stop ArcGIS Data Store on the remaining graph store machine.
    2. Rename the ArcGIS Data Store content directory on the remaining graph store machine.

      This keeps the existing content as a backup, but you will specify a new directory when you restore the graph store.

    3. Restart ArcGIS Data Store on the remaining graph store machine.
  6. If you are not reusing the remaining graph store machine, install ArcGIS Data Store as a graph store on a new machine.

    Do not proceed with configuration. Close the Data Store configuration wizard when it opens at the end of the installation.

  7. From the command prompt on the graph store machine, run the restoredatastore utility from <ArcGIS Data Store installation directory>\datastore\tools and include the --loaddata operation set to false to prepare the first machine for restoring the graph store.

    See the utility reference or type --help at the command line for syntax.

    This example prepares the machine to restore the most recent backup of the graph store from \\myserver\backups\graph to C:\arcgisdatastore. The --loaddata operation is set to false so the data is not yet loaded.

    restoredatastore --store graph --target most-recent --source-loc \\myserver\backups\graph --data-dir C:\arcgisdatastore --loaddata false --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password MySApw

    The directory you specify with the --data-dir option is the name of the new ArcGIS Data Store content directory. Restoring will create the directory with this name.

  8. Install ArcGIS Data Store as a graph store on two new machines and run the configuredatastore utility on each to add the machines to the hosting server.
  9. Run the restoredatastore utility again without the --loaddata option or with --loaddata set to true to restore all the data.

    Data will be loaded to the content directory (data-dir) and distributed across all three graph store machines.

    This example restores the data to the graph store cluster using the same backup file (on \\myserver\backups\graph). The --loaddata option is set to true by default, so you don't need to specify it when you load the data.

    restoredatastore --store graph --target most-recent --source-loc \\myserver\backups\graph --data-dir C:\arcgisdatastore --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password MySApw

As noted before step 3, if you reused the graph store machine and other ArcGIS Data Store types were present, you must now restore those other data stores. Specify the same content directory and provide the hosting server URL when you restore.

Restore the spatiotemporal big data store, object store, or graph store when the target machine can hold all the data in the backup file

If the first machine where you create the replacement spatiotemporal big data store, tile cache data store (cluster mode), object store (cluster mode), or graph store (cluster mode) contains enough disk space and memory to hold all the data in the backup file or if you are restoring to the existing data store machines, you only need to run the restoredatastore utility once. Once restored, you can add the other new machines to the spatiotemporal big data store, object store, or graph store, and ArcGIS Data Store will replicate the data across the other machines.

  1. Install ArcGIS Data Store on a new machine.

    Do not proceed with configuration. Close the Data Store configuration wizard when it opens at the end of the installation.

  2. Open a command prompt using the Run As Administrator option.
  3. Run the restoredatastore utility from <ArcGIS Data Store installation directory>\datastore\tools and include the --loaddata operation set to true.

    See the utility reference or type --help at the command line for syntax.

    This example restores the most recent backup of a spatiotemporal big data store from \\myserver\backups\spatiotemporal to C:\arcgisdatastore on the new machine. The --loaddata operation is set to true because this new machine can hold all the data from the backup file.

    restoredatastore --store spatiotemporal --target most-recent --source-loc \\myserver\backups\spatiotemporal --data-dir C:\arcgisdatastore --loaddata true --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password MySApw

    If the directory you specify with the --data-dir option does not exist, it will be created. If it does exist, you must have write access to it and it must be empty. If not, the restore operation will fail.

    In this case, you can omit the --loaddata operation, as data is loaded by default.

    If the machine cannot accommodate all the data from the backup file, the restore operation will fail.

  4. Install ArcGIS Data Store on additional machines and run the Data Store configuration wizard or the configuredatastore utility on each to add data store machines to the hosting server.

    You must use the configuredatastore utility to add machines to a graph store.

    ArcGIS Data Store will distribute and replicate the data across the other machines.

Restore the relational or tile cache data store to a different operating system

You can use your backup files to restore a relational or tile cache data store to a machine running a different operating system (OS) by completing the steps below.

For example, if the relational data store is running on a Microsoft Windows server, but your information technology department is switching to Linux servers, you can use the backup files created from an ArcGIS Data Store installation on the Windows server to restore to a relational data store on the Linux server.

  1. Install ArcGIS Data Store on the new server.

    Do not proceed with configuration.

  2. If you don't have a full backup of the existing relational or tile cache data store, use the backupdatastore utility to create one.
  3. Place the backup file in a shared location that can be accessed by the new ArcGIS Data Store installation.
  4. Run the restoredatastore utility to restore to the new machine. Use the --server-url operation to specify the URL of the portal's existing hosting server (a GIS Server site) when you restore, so the existing hosted feature and scene layers will continue to work.

    In this example, a relational data store is restored and registered with the GIS Server site https://mygisserver.example.com:6443. The backup file is in the shared directory \\backups\relational, and the ArcGIS Data Store directory on the new machine is C:\arcgisdatastore.

    restoredatastore --store relational --source-loc \\backups\relational --data-dir C:\arcgisdatastore --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password MySApw