Once you have created your primary and standby ArcGIS Enterprise deployments, you can automate replication from the primary to the standby using the webgisdr utility, separate properties files for full and incremental backups, and a scheduled task using Windows Task Scheduler.
To keep your primary and standby deployments more closely synchronized, create full backups on a regular schedule using the webgisdr utility, but export incremental changes between full backups. For example, if the services and data in your ArcGIS Enterprise deployment change a fair amount in a day, you might create a full backup at midnight, and export incremental changes at 10:00 a.m., 2:00 p.m., and 6:00 p.m. to pick up changes that occurred throughout the work day.
To automate this, create four copies of the template properties file (webgisdr.properties) and four different scripts to complete the following tasks:
- Export full backups from the primary deployment and copy files to the standby deployment.
- Export incremental backups from the primary deployment and copy to the standby deployment.
- Import full backups to the standby deployment.
- Import incremental backups to the standby deployment.
Use Windows Task Scheduler to run each script at specific times.
When deciding how frequently to run the scripts, you need to account for the time it takes to complete the export and copy the data. You'll need to run through this manually first to get an idea of how long it takes to create a full backup and copy it over your network to the standby deployment, and how long it takes to create incremental backups and copy them over your network to the standby deployment. Include a buffer of 30 to 60 minutes to account for fluctuations in network and hardware performance.
For example, if it takes 20 minutes to create an incremental backup and 5 minutes to copy it to the standby, schedule the import of the incremental backup to take place an hour after the incremental backup script runs. So if the script to create an incremental backup runs at 10:00 a.m., schedule the import to run at 11:00 a.m.
Make a copy of the webgisdr.properties file and name it expfullbackups.properties. Save the file in the same location as the webgisdr.properties file.
The default location is C:\Program Files\Portal\tools\webgisdr.
- Open the expfullbackups.properties file in a text editor, and edit it to include information specific to your deployment.
- SHARED_LOCATION = <location for backup files>
Designate a shared location in which to create a temporary copy of the backup file. The domain account that runs the ArcGIS Server, Portal for ArcGIS, and ArcGIS Data Store service and the account running the webgisdr utility must have write access to this location. Be sure the location is large enough to hold the backup file. Though the file is compressed, the file can be quite large depending on the amount and type of data you have. If you have hosted scene layers and caches and set INCLUDE_SCENE_TILE_CACHES to true, the file can be especially large.
If you set BACKUP_STORE_PROVIDER to FileSystem and you set SHARED_LOCATION to a folder, the disaster recovery tool will import the latest backup file in that folder. If you set SHARED_LOCATION to a specific backup file in the folder, that file will be imported by the disaster recovery tool.
If you set BACKUP_STORE_PROVIDER to AmazonS3, set SHARED_LOCATION to an S3 bucket.
If you set BACKUP_STORE_PROVIDER to Azure, set SHARED_LOCATION to the Azure Blob Storage container.
- PORTAL_ADMIN_URL = <portal admin directory URL>
Specify the URL of the Portal for ArcGIS admin directory. Use the format https://portalhostname.domain.com:7443/arcgis, where portalhostname.domain.com is the fully qualified name of the machine where Portal for ArcGIS is installed.
- PORTAL_ADMIN_USERNAME = <portal administrator user name>
Specify the user name of a portal member assigned to the Esri-defined Administrator role.
- PORTAL_ADMIN_PASSWORD = <portal administrator password>
Specify the password of the portal administrator account.
- PORTAL_ADMIN_PASSWORD_ENCRYPTED = <true | false>
Set this option to false the first time you populate the file with your administrator password. When you save the file, your password is encrypted and the value for PORTAL_ADMIN_PASSWORD_ENCRYPTED is set to true to indicate the password has been encrypted. If you need to change the password in the future, set PORTAL_ADMIN_PASSWORD_ENCRYPTED = false, provide your new administrator password, and save the file.
- INCLUDE_SCENE_TILE_CACHES = <true | false>
If you publish hosted scene layers to your portal and want to include the scene cache data in the backup, set INCLUDE_SCENE_TILE_CACHES to true. Be aware that, if set to true, all scene cache data is included in the backup, not just the new cache data created since your last backup. If you know that no new scene caches have been created since your last backup or if you do not publish scenes to your portal, you can set INCLUDE_SCENE_TILE_CACHES to false.
- BACKUP_RESTORE_MODE = full.
- SHARED_LOCATION = <location for backup files>
- Save changes and close the expfullbackups.properties file.
- Make a copy of the expfullbackups.properties file and name it expincremental.properties.
- Open the expincremental.properties file in a text editor and change the BACKUP_RESTORE_MODE setting to incremental.
- Save changes and close the expincremental.properties file.
- Create two scripts that will run the webgisdr utility to export from your primary deployment. Set one to call the expfullbackups.properties file and set the other to call the expincremental.properties file.
You create two scripts so you can schedule one to run at specific times to create full backups and one to run at other times to create the incremental backups.
- The scripts you use to export backups need to include a way to copy the backup files to the standby deployment.
The domain account that runs the ArcGIS Server, Portal for ArcGIS, and ArcGIS Data Store services on the primary deployment must have write access to the SHARED_LOCATION set in the .properties file. Additionally, the account running the webgisdr utility must have write access to the SHARED_LOCATION and the location to which you copy the backup files. The domain account that runs the ArcGIS Server, Portal for ArcGIS, and ArcGIS Data Store services on the standby deployment must have at least read access to these locations.
- If your ArcGIS Enterprise deployment includes map service and hosted tile layer caches, the scripts also need to copy these from the cache director (or directories) of the ArcGIS Server sites in your primary deployment to the cache directory (or directories) on the standby deployment.
- Copy the expfullbackups.properties and expincremental.properties files to the location of the webgisdr.properties file on the standby deployment (C:\Program Files\Portal\tools\webgisdr by default), and rename the files impfullbackups.properties and impincremental.properties, respectively.
- The two scripts that will import the backups need to call the properties files you copied to the standby deployment.
- Schedule scripts to run on the primary and standby deployments.
As mentioned in the introduction, you'll need to estimate the time it takes to complete full and incremental backups and how long it takes to copy the backup files, add a buffer time to it, and schedule your scripts to run accordingly.