Skip To Content

Recover a data store

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

In the case where the data store crashes, install ArcGIS Data Store on a new machine and restore the latest available backup using the restoredatastore utility.

If your relational data store is configured for point-in-time recovery, you can recover hosted feature layer data to a specific point in time by restoring on top of the existing relational data store and specifying a date and time to which you want to restore.

The backup files you use for recovery are compressed. When you restore your data, these files must be uncompressed to a staging location. That means you need to have a staging location that can accommodate this data. By default, the files are staged in your data directory.

Tip:

If you have a lot of data in your data store, you may want to set up a separate staging location and specify that for data store recovery. You can specify a separate staging location using the changestaginglocation utility.

Be aware that clients and services cannot access the data store while you are restoring it.

Restore a relational or tile cache data store after a crash

If the hardware stops functioning or the relational or tile cache data store is unavailable and cannot be brought back online, install ArcGIS Data Store on a new machine and apply your 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.

  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 shell.
  3. Run the restoredatastore utility from <ArcGIS Data Store installation directory>\datastore\tools to restore the most recent backup of the relational 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 /net/fortknox/backups/datastore/relational to /usr/arcgisdatastore. Since the data store remains bound by default to the GIS Server site with which it was registered, you do not have to specify --bound true, but you do need to specify the GIS Server site URL and administrator credentials.

    ./restoredatastore --store relational --target most-recent --source-loc /net/fortknox/backups/datastore/relational --data-dir /usr/arcgisdatastore --server-url https://gisserver.domain.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 a spatiotemporal big data store after a crash

If one or more of the machines in your spatiotemporal big data store fails, you have to restore to a new machine. Since your spatiotemporal big data store likely contains multiple machines and large amounts of data, restoring all the data to a single new machine would fail. You can restore your spatiotemporal big data store in stages to avoid running out of memory and disk space on a single machine.

Restore a spatiotemporal big data store containing large volumes of data

If all the data in your backup file will not fit on a single machine and you are restoring to a new machine, follow these steps to restore your spatiotemporal big data store:

  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 shell.
  3. 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 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 /net/myserver/backups/spatiotemporal to /usr/arcgisdatastore. The --loaddata operation is set to false so the data is not yet loaded.

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

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

  4. Install ArcGIS Data Store on additional machines and run the Data Store Configuration wizard or configuredatastore utility on each to add spatiotemporal big data store machines to your hosting server.
  5. 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 spatiotemporal big data store machines.

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

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

Restore a spatiotemporal big data store when the target machine can hold all the data in the backup file

If the first machine on which you create your replacement spatiotemporal big data store contains enough disk space and memory to hold all the data in your back up file or if you are restoring to your existing spatiotemporal big data store machines, you only need to run the restoredatastore utility once. Once restored, you can add the other new machines to your spatiotemporal big data 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 shell.
  3. Run the restoredatastore utility from <ArcGIS Data Store installation directory>\datastore\tools and include the --loaddata operation set to true the 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 /net/myserver/backups/spatiotemporal to /usr/arcgisdatastore. 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 /net/myserver/backups/spatiotemporal --data-dir /usr/arcgisdatastore --loaddata true --server-url https://gisserver.domain.com:6443 --server-admin siteadmin --server-password MySApw

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

    Note that you could omit the --loaddata operation in this case, 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 configuredatastore utility on each to add spatiotemporal big data store machines to your hosting server.

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

Restore a relational or tile cache data store to a different OS or release

You can use your backup files to restore a relational or tile cache data store to a machine running a different operating system or running a different version of ArcGIS Data Store.

For example, if your tile cache 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 10.5.1 or later installation on the Windows server to restore to a tile cache data store on the Linux server.

  1. Install ArcGIS Data Store on the new server. Do not proceed with configuration.

    The ArcGIS Data Store you install on the new machine can be the same version of ArcGIS Data Store or a newer version as the one you want to restore from.

  2. If you don't already 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. Specify --bound true and the URL of the portal's existing hosting server (a GIS Server site) when you restore. That way, existing hosted feature and scene layers will continue to work.

    In this example, a tile cache data store is restored and registered with the GIS Server site https://mygisserver.domain.com:6443. The backup file is in the shared directory /net/backups/tilecache and the ArcGIS Data Store directory on the new machine is /arcgis/datastore.

    ./restoredatastore.sh --store tileCache --source-loc /net/backups/tilecache --data-dir /arcgis/datastore --server-url https://gisserver.domain.com:6443 --server-admin siteadmin --server-password MySApw

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

If your 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 prior to those edits.

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.

Also note that if you disabled automatic backups, you cannot restore to a specific point in time.

  1. Open a command shell.
  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 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.domain.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:

    If you want to script the restoredatastore command, 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

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