Skip To Content

ArcGIS Data Store command utility reference

In this topic

Command utilities are installed with ArcGIS Data Store to allow the data store administrator to manage the data store. This topic describes the utilities and provides syntax and examples.

All utilities must be run on the data store machine. You can find the utilities in the <ArcGIS Data Store installation directory>\datastore\tools directory.

You can type the utility name followed by --help to get syntax assistance.

Note:

Your login must be a member of the Windows Administrator group and you must open the Command Prompt with the option to Run as Administrator to use the ArcGIS Data Store utilities.

allowconnection

For security reasons, all connections to the data store are made through the ArcGIS Server site by default. If you want to open the data store for connections from an additional machine, you can use the allowconnection command utility.

The allowconnection utility can only be run on the primary data store machine.

Syntax

allowconnection <host name> <user name> [<database>]

Specify the name of the computer you want to connect to the data store (host name) and one of the database accounts used by the data store (user name): either the data store administrator, replica owner, geodatabase administrator, or managed user (the user who publishes feature layer data), which you can obtain using the listadminusers or listmanageduser utility. You can also specify the name of the data store database but, since there is only one data store database, this value is optional.

Example

In this example, a connection is allowed from the workcom computer to the data store database when connections are made as the hqo.n_1E7 managed user.

allowconnection workcom hqo.n_1E7

backupdatastore

If you need to create a data store backup between scheduled backup times, use the backupdatastore utility. You would manually create a full backup prior to upgrading the data store or before making a large number of changes to the data store.

The backupdatastore utility can only be run on the primary data store machine.

Syntax

backupdatastore <backup name>

Example

In this example, a full backup file named project1bu is created in the backup location you specified for the data store using the changebackuplocation utility.

backupdatastore project1bu

You are going to back up the data store. This could take some time, depending on the size of your data store.
Please do not interrupt the process once it has started.

Do you want to continue (Yes or No)?Yes

changebackuplocation

Data store backup files are stored on the same machine as the data store by default. You should move your backup files to a separate machine to ensure you can access them if the data store is inaccessible.

Set the data store service to run using a domain account, grant that account read and write access to a shared network directory, and use the changebackuplocation utility to move your data store backup files to the shared directory on a different machine.

Syntax

changebackuplocation <new directory path> [--is-shared-folder<true|false>] [--keep-old-backups <true|false>]

Specify --is-shared-folder true if the backup location is on a shared network machine. If you want existing backup files to be moved to the new location, specify --keep-old-backups true.

Example

In this example, backups will be created in the shared ds_backups directory on the machine sysshare. Any backups that exist in the current backup directory will be moved to this new location.

changebackuplocation \\sysshare\ds_backups --is-shared-folder true --keep-old-backups true

You are going to change the data store backup directory.
Do you want to continue (Yes or No)?Yes

changedbproperties

By default, ArcGIS Data Store accepts up to 150 connections. When determining how many connections your data store requires, take into consideration that ArcGIS Data Store internal processes can take up to five connections. Also consider how many concurrent connections your ArcGIS Data Store machine can accpet and remain performant.

If you will require more than 150 connections, or your data store is running on a machine with not a lot of memory, you can use the changedbproperties utility to change the maximum number of connections allowed to the data store.

When you change the maximum number of connections allowed, the number is changed on both the primary and standby data store machine.

Syntax

changedbproperties --max-connections <maximum number connections allowed>

The number specified cannot be smaller than 10.

Example

In this example, the number of maximum connections is set to 100:

changedbproperties --max-connections 100

You are changing the following database properties:
         max number of connections to 100 (on all data store machines)

Changing database configurations could cause the database to restart. Please do not interrupt the process once it has started.

Do you want to continue (Yes or No)?Yes

changeloglocation

If you do not want the data store to use the default error log file location of <ArcGIS Data Store installation directory>\arcgisdatastore\logs, you can run the changeloglocation utility to create log files in a different directory.

The ArcGIS Data Store account must have write privileges to the folder you specify.

Syntax

changeloglocation <directory path>

Example

In this example, log files will be created in the local directory, d:\datastorefiles\logs.

changeloglocation 'd:\datastorefiles\logs'

changenosqldatalocation

The data store that holds scene layer tiles can get large if you store a lot of high-resolution tiles in it. In those cases, you might want to move the data to either another drive on the same server or to a shared location on a different server.

If you move the data to a shared directory, you must grant read and write permissions on the directory to the user running the ArcGIS Data Store process (Linux) or service (Windows).

changenosqldatalocation <path> [--prompt {yes | no}]

In this example, the scene tile data is moved to a shared directory named dstorecache on machine server2.

changenosqldatalocation \\server2\dstorecache

changepassword

ArcGIS Data Store randomly generates user names and passwords for the database accounts used for the data store. If your site requires you to set your own passwords, obtain the passwords for the accounts using listadminusers and listmanageduser, and run changepassword to reset passwords.

The changepassword utility can only be run on the primary data store machine.

Syntax

changepassword <user name> <new password> [--prompt {yes | no}]

Tip:

If you need to script password changes, include a flag to suppress the confirmation prompt, as in the following example:

changepassword gwi_n2Te0 Phfl4mp! --prompt no

Example

In this example, the password is changed for user gwi_n2Te0 to Phfl4mp!.

changepassword gwi_n2Te0 Phfl4mp!

You are going to change the password for user gwi_n2Te0.
Do you want to continue (Yes or No)?Yes

changestaginglocation

When you restore your data, ArcGIS Data Store uncompresses the compressed backup files on a staging location. That means you need to have a staging location that can accommodate this uncompressed data. If you have a lot of data in your data store, you might want to set up a separate staging location and specify that for database recovery.

Syntax

changestaginglocation <directory path>

Example

In this example, the designated staging location is \\netserver\stage.

changestaginglocation \\netserver\stage

configuredatastore

After you install ArcGIS Data Store, you can run the configuredatastore command utility to create a data store and register it with an ArcGIS Server site.

Syntax

configuredatastore <ArcGIS Server admin URL> <ArcGIS Server administrator> <ArcGIS Server administrator password> <data directory> [--nosql-only true|false]

The ArcGIS Server admin URL is in the format https://gisserver.domain.com:6443/arcgis.

Provide the user name and password for a built-in (not enterprise) user who has administrator privileges in ArcGIS Server.

The data directory is the location on the local machine where you want the data store files to be created.

If you want to use your own managed database as a data store, but you want to publish scene layers, you can run the configuredatastore utility with the --nosql-only option set to true. This will register only the database used to store the cached tiles used for scene layers and will not create a database for feature layer data.

Example

In this example, the ArcGIS Server URL is https://dataserver.mydomain.com:6443/arcgis/admin, the site administrator user name and password are admin and Iph33l$ik, and the data directory is C:\datastore\data\.

configuredatastore https://dataserver.mydomain.com:6443/arcgis admin Iph33l$ik c:\datastore\data\

deletebackup

The deletebackup utility allows you to delete data store backup files that you created. First, run the listbackups utility to see the names and creation times of your manual backups. You can then run the deletebackup utility to delete the manual backup you no longer need.

Note that you can only delete backups that are not required to recover your data store. For example, you cannot delete the most recent full backup of the data store.

Syntax

deletebackup <backup name>

Example

deletebackup featuresMarchbu
You are attempting to delete backup 'featuresMarchbu'. This operation is irreversible.

Do you wish to continue (Yes or No)?yes

Operation completed successfully

describedatastore

The describedatastore utility allows you to see the following information about the data store:

  • Backup, log file, staging, and NoSQL data locations used by the data store
  • Whether the backup location is on a network share
  • How often a full data store backup is created (Backup schedule)
  • How many days backup files are retained
  • Whether or not the data store is running (Data store status)
  • The date and time that the standby data store became the primary data store (Last failover); not displayed if failover has never occurred
  • The names of the primary and standby machines (if applicable) that participate in the data store (Member machines)
  • Maximum connections allowed to the data store's managed database
  • The URL of the ArcGIS Server site with which the data store is registered (Owning System URL)
  • The URL of the portal that is using the ArcGIS Server site as its hosting server (Portal URL)
  • The number of current feature layer connections to the data store
  • The remaining free disk space on the data store machine

Note:

NoSQL information is new in ArcGIS 10.3.1 Data Store.

Syntax

describedatastore

Example

describedatastore

Information of ArcGIS DataStore sthiu0_5T
================================================
Backup location...........\\nwshare\dsbackups
Is backup folder shared...true
Staging location..........C:\arcgisdatastore\staging
NoSQL data location.......C:\arcgisdatastore\nosqldata
Log location..............C:\arcgisdatastore\logs
Backup schedule...........{"schedule-starttime":"00:00:00","schedule-frequency":"Every 7 DAYS"}
Days backup retained......31
Data store status.........Started
Last failover.............20150130190334005
Member machines...........DSPRIMARY.DOMAIN.COM, DSFAILOVER.DOMAIN.COM
Maximum connections.......150
Owning system URL.........https://gisserver_webadaptor.esri.com/arcgis
Portal for ArcGIS URL.....https://portal_webadaptor.esri.com/arcgis
Number of connections.....8 connection(s) to managed database
Free disk space...........174.00GB

exportmanageddb

Note:

New in ArcGIS 10.3.1 Data Store.

The exportmanageddb utility creates a dump file of the data store's managed database (the database that stores hosted feature layer data) and metadata about the data store. Export the data store if you need to make a backup of the managed database to be restored to an ArcGIS Data Store installation that is on a machine with a different operating system or is a different ArcGIS Data Store release.

Be sure no one is editing feature layers or publishing to your portal before you have imported the managed database to the new machine.

Syntax

exportmanageddb <backup name> --destination <output location> [--prompt {yes|no}]

If you do not specify the --destination option and output location, a directory called dbdump will be created (if it does not already exist) in the data store's default backup location, and the export files are placed in a new directory there. For example, if your data store's default backup directory is \\sysshare\ds_backups and you specify dsexp1 for the backup name but do not specify an output location, the exported managed database and its associated files are placed in the following location: \\sysshare\ds_backups\dbdump\dsexp1.

Example

In the following example, the managed database and its associated files are output to a shared network directory named preupgradeexp on a server named backupserver.

exportmanageddb preupgradeexp --destination \\backupserver

You are attempting to back up database 'db_e3hsm'. This 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

importmanageddb

Note:

New in ArcGIS 10.3.1 Data Store.

Use the importmanageddb utility to restore an ArcGIS Data Store managed database to an upgraded ArcGIS Data Store or to an ArcGIS Data Store installation on a machine with a different operating system than the source ArcGIS Data Store.

If you set the --bound option to true when you restore, be sure to restart the ArcGIS Server site. Note that --bound is set to true by default.

Syntax

importmanageddb <backup name> --source-loc <source backup location> --data-dir <data store data directory> [--bound {true|false}] [--prompt {yes|no}]

Example

In the following example, the managed database is restored to a newer release ArcGIS Data Store installation. The new ArcGIS Data Store data directory is specified. The data store is still bound to the existing ArcGIS Server site, so the data store and existing hosted feature layers continue to function. To make sure new hosted feature layers are published to the new machine, restart your ArcGIS Server site.

importmanageddb preupgradeexp --source-loc \\backupserver\dbdump\preupgradeexp --data-dir c:\arcgis\datastore --bound true

listadminusers

The listadminusers utility returns the user names and passwords for the data store administrator, replica owner, and geodatabase administrator.

Syntax

listadminusers

Example

listadminusers

Admin users for ArcGIS Data store ds_abcd1234
=================================================
Database Admin User.... adm_32ret / tT30!bYk22jF
Database Repl User..... dsrepuser / uWn/MV0678h4
GDB Admin User......... sde / iO=Qst751*pb

listbackups

The listbackups utility returns the names of full data store backups and the location to which they are written. The listbackups utility also returns the backup status (whether it completed or not), the time the backup started, and whether the backup was created manually using the backupdatastore utility or created automatically by ArcGIS Data Store.

You can run listbackups to see whether a backup completed or is still running, determine how many manual backups you have, or confirm a file name before running the deletebackup utility.

Syntax

listbackups

Example

listbackups

Backup_Name                      Status           Backup_Time         Mode
====================================================================================
phase1proj_bu                    BackupComplete   2014-03-08 14:12    manual
phase2proj_bu                    BackupComplete   2014-06-21 11:43    manual
ds_gdt1oomh-20141103160748082    BackupComplete   2014-11-01 03:00    scheduled

Backups located at: '\\myserver.net.com\dsbackups'

listmanageduser

The listmanageduser utility returns the user name and password of the data store's managed user. The managed user is the database account used to publish hosted feature layers. This account owns the data stored in the data store.

Syntax

listmanageduser

Example

listmanageduser

Managed user for ArcGIS Data store ds_abcd1234
================================================
UserName     Password             Database
gwi_n2Te0    4cXddhZhve=Y         db_qv5e1

registerdatastore

The data store retains information about the ArcGIS Server site machine names. If you move your ArcGIS Server site to new machines (for example, if you got new hardware or if the existing ArcGIS Server machines failed), you must unregister the data store from ArcGIS Server to remove this information. Once ArcGIS Server is on a new machine, you can register the data store with the ArcGIS Server site using the registerdatastore command utility.

Note that this is used to register the data store to the same ArcGIS Server site it was registered to previously. The data store contains the data for the hosted feature layers on the existing ArcGIS Server site. Registering it to a different ArcGIS Server site does not re-create the hosted feature layers.

The registerdatastore utility can only be run on the primary data store machine.

Syntax

registerdatastore <ArcGIS Server URL> <ArcGIS Server site administrator user name> <ArcGIS Server site administrator password>

Example

In this example, the data store is reregistered to an ArcGIS Server site with the URL https://gisserver.domain.com:6443/arcgis. The ArcGIS Server primary site administrator user name is agsadmin with the password Tan$p0n.

registerdatastore https://gisserver.domain.com:6443/arcgis agsadmin Tan$p0n

removestandbymachine

You can use the remove ArcGIS Server REST command from the ArcGIS Server site administrator to remove a standby machine from a data store. However, if the ArcGIS Server site is unavailable, you won't be able to log in to the site administrator to do this. In those cases, run the removestandbymachine utility to remove a standby machine from the data store.

The removestandbymachine utility can only be run on the standby data store machine.

Syntax

removestandbymachine <machine name>

Example

In this example, the standby machine is named dsserver2.

removestandbymachine dsserver2

restoredatastore

If you lose access to the data used by your portal's hosted feature layers, use your backup files and the restoredatastore command utility to recover your data store.

If the data store has crashed and cannot be recovered, install the data store on a new machine and restore the most recent backup of the data store to the new machine.

If you want to roll the data back to a specific time in the past, restore on top of the existing data store. Note that you can only restore to a previous 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 can only be run on the primary data store machine.

Syntax

restoredatastore [--target {most-recent | yyyy-mm-dd-hh:mm:ss | <backup file>}] [--source-loc <location of backup files>] [--bound <true|false>] [--data-dir <new data store directory>] [--prompt {yes | no}]

When restoring after a crash or to move the data store, specify --target most-recent. If restoring to a point in time, specify the date and time (in UTC) to which you want to restore the data store. If you have a specific backup file you want to restore, specify the backup file name instead. If you do not specify a target, the most recent backup is restored.

By default, the restored data store is associated (bound) with its ArcGIS Server site. Only specify --bound false if you want to restore the data store without maintaining the association with the data store's ArcGIS Server site. You would only do this as a last resort if the previous ArcGIS Server site was lost and could not be recovered; you could restore the data store unbound and configure it with a new federated ArcGIS Server site. However, the feature 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 the portal.

Example

In this example, the most recent backup is from \\buserver\data\backups to C:\arcgisdatastore. Since the data store remains bound by default to the ArcGIS Server site with which it was registered, you do not have to specify --bound true.

restoredatastore --target most-recent --source-loc \\buserver\data\backups --data-dir C:\arcgisdatastore

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 data store is restored from \\buserver\data\backups to the state it was in at 2:30 p.m. (UTC) on July 17th, 2014.

restoredatastore --target 2014-07-17-14:30:00 --source-loc \\buserver\data\backups

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

revokeconnection

If you temporarily allowed another client to connect directly to the data store, you can revoke the connection ability by running the revokeconnection utility.

The revokeconnection utility can only be run on the primary data store machine.

Syntax

revokeconnection <host name> <user name> [<database>]

Example

In this example, the data store database will no longer accept connections from the workcom machine when logged in as user hqo.n_1E7.

revokeconnection workcom hqo.n_1E7

unregisterdatastore

You can unregister a primary data store machine from your ArcGIS Server site using the unregisterdatastore command utility. If you have a standby machine, you must first remove it from the data store before you can unregister the primary machine.

You would unregister a data store from your ArcGIS Server site if you decide you no longer want to use the data store. When you unregister a machine from the data store, ArcGIS Server can no longer connect to that machine.

The unregisterdatastore utility can only be run on the primary data store machine.

Syntax

unregisterdatastore [--prompt {yes | no}]

Example

Here, the unregisterdatastore utility is run with a prompt returned. This is the default behavior. To suppress the prompt, specify --prompt No.

unregisterdatastore

You are going to unregister the data store.
Do you want to continue (Yes or No)?Yes

updatebackupretaindays

ArcGIS Data Store retains the backup files for 31 days by default. You can change how often backup files are purged from the backup directory by running the updatebackupretaindays utility.

The updatebackupretaindays utility can only be run on the primary data store machine.

Syntax

updatebackupretaindays <number of days>

Example

In the following example, backup file retention time is changed to 20 days:

updatebackupretaindays 20

updatebackupschedule

By default, ArcGIS Data Store creates a full backup once a week. You can change how often a full backup is created by running the updatebackupschedule utility.

Specify a start time using 24-hour clock notation, for example, 00:00:00 for midnight and 13:00:00 for 1 p.m.

The updatebackupschedule utility can only be run on the primary data store machine.

You must restart ArcGIS Data Store for changes to take effect.

Syntax

updatebackupschedule --starttime <local server time> --frequency <number of days>

Example

In this example, full backups will take place at 11 p.m. (local server time) every 10 days:

updatebackupschedule --starttime 23:00:00 --frequency 10

updatelicense

If your ArcGIS for Server license expires, you must update the license on the ArcGIS for Server site. The license information is also stored in the ArcGIS Data Store managed database; therefore, after updating the license of the ArcGIS for Server site with which the data store is configured, you must update the license in the data store. To do that, run the updatelicense utility from the machine where your primary ArcGIS Data Store is installed. If you have a standby ArcGIS Data Store, the updated license will be replicated to it.

Syntax

updatelicense

Example

After you update the ArcGIS for Server license, run the updatelicense utility to move the new license to the data store.

updatelicense