restoredatastore
This utility is used with all ArcGIS Data Store types.
If you lose access to the data used by your hosted layers, use your backup files and the restoredatastore utility to recover the data store.
If you cannot recover the data store, install ArcGIS Data Store on a new machine, do not configure the data store, and restore the last full backup to the new machine.
If you use a relational store and need to roll the hosted feature layer data back to a specific time in the past, restore on top of the existing relational store.
Note:
The relational store must be configured to support point-in-time recovery, and you can only restore to a previous relational store state for which you have backup files available. For example, if you only retain backups for five days, you can only recover the data store to a point in time within those five days.
The restoredatastore utility must be run on the primary relational store machine. The utility can be run on any of the spatiotemporal big data store, graph store, or object store machines.
Note:
To discover which backup files you can use to restore, run the listbackups utility.
Syntax
restoredatastore [options]
Supported options are listed in the table below:
|
Option |
Description |
|---|---|
|
|
Indicates the type of data store to restore. Valid values are |
|
|
Valid values are All data store types support the backup file name with the When restoring after a crash or to move the relational store, specify |
|
|
This is the top-level directory where the backup files you want to use to restore the data store are located. This will be the path to a file share location, a backup location name, or an Amazon S3 or Azure Blob Storage backup location. Tip:To obtain backup source locations, you can run the |
|
|
Valid values are The By default, it is assumed that you are restoring the relational store to work with the same GIS Server site it was registered with when you created the backup. Only specify You could also restore the relational store unbound from its GIS Server as a last resort if the GIS Server site was lost and could not be recovered; you could restore the data store unbound and configure it with a new federated GIS Server site. However, the layers that used the data in the data store would no longer exist. You would have to connect to the data store database to extract the data to another format and republish it to ArcGIS Enterprise. |
|
|
This is the ArcGIS Data Store directory on the machine where you are restoring the database. Only use |
|
|
If you specify |
|
|
This option is required if you specify |
|
|
This option is required if you specify |
|
|
Supported with the spatiotemporal big data store and graph and object stores. Valid values are Set this option to |
|
|
Valid values are When you restore a graph store or object store to a new machine, you can specify |
|
|
Valid values are When you run this utility, you are prompted to confirm the action you specified. If you automate the use of this utility, set the |
Examples
In this example, the most recent backup is in a backup location named rdsbackups and will be restored to the existing data store. Because the default store type is relational, and it remains bound by default to the GIS Server site with which it was registered, you do not have to specify --store relational or --bound true. However, you do have to specify the GIS Server URL and administrator credentials.
./restoredatastore.sh --target most-recent --source-loc rdsbackups --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password SAup.4s
restoredatastore --target most-recent --source-loc rdsbackups --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password $Aup.4s
You are attempting 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
In this example, a relational store that has point-in-time recovery enabled is restored from the relational store backup location on a network share to the state it was in at 2:30 p.m. (UTC) on July 17, 2014.
./restoredatastore.sh --target 2014-07-17-14:30:00 --source-loc /net/sharedserver/entbackups/relds --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password SAup.4s
restoredatastore --target 2014-07-17-14:30:00 --source-loc \\sharedserver\entbackups\relds --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password $Aup.4s
You are attempting 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
In this example, the relational store is restored to a new machine using a backup file named movedatastore. When you restore to a new machine, you must specify the location of the backup file and the location of the new ArcGIS Data Store content directory. Because the hosted feature services are still running on the same GIS Server site with which the relational store is registered, --bound true is not required, but the GIS Server URL and administrator credentials are required.
./restoredatastore.sh --target movedatastore --source-loc /net/buserver/data/backups --data-dir /usr/datastore --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password SAup.4s
restoredatastore --target movedatastore --source-loc \\buserver\data\backups --data-dir C:\datastore --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password $Aup.4s
You are attempting 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
In the following example, a spatiotemporal big data store backup file (bds1) is restored from a named backup location (awsloc).
./restoredatastore.sh --target bds1 --store spatiotemporal --source-loc 'name=awsloc' --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password SAup.4s
restoredatastore --target bds1 --store spatiotemporal --source-loc name=awsloc --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password $Aup.4s
You are attempting 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
See Recover a data store for steps and an example of restoring a spatiotemporal big data store after hardware failure.
In this example, the graph store is restored to a new machine. When you restore to a new machine, you must specify the location of the backup file and the location of the new ArcGIS Data Store content directory. Because the knowledge graph layers are still running on the same GIS Server site with which the graph store is registered, --bound true is not required, but the GIS Server URL and administrator credentials are required.
./restoredatastore.sh --store graph --source-loc /net/buserver/kgdata/backups --data-dir /usr/datastore --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password SAup.4s
restoredatastore --store graph --source-loc \\buserver\kgdata\backups --data-dir C:\datastore --server-url https://gisserver.example.com:6443 --server-admin siteadmin --server-password $SAup.4s