Skip To Content

Automate replication to a standby deployment

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 a cron job.

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.

Set a cron job 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.

  1. 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 /arcgis/portal/tools/webgisdr.

  2. 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 files for ArcGIS Server, Portal for ArcGIS, and ArcGIS Data Store. The account that installed ArcGIS Server, Portal for ArcGIS, and ArcGIS Data Store and the account running the webgisdr utility must have read and write privileges on this location. Be sure the location is large enough to hold the backup files for each component. Though the files are compressed, they 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 ArcGIS Data Store backup file can be especially large.

      Ensure any backslashes in the path are escaped. For example, C:\backupswould be entered as C:\\backups and \\fileserver\backups would be entered as \\\\fileserver\\backups.
    • BACKUP_STORE_PROVIDER = {FileSystem | AmazonS3 | AzureBlob}

      Define whether you want to save the webgissite backup file on the file system or on cloud storage.

      To store your ArcGIS Enterprise backup in a file share location on-premises, specify FileSystem, and the webgisdr utility will store your backup files in the file share you specify for BACKUP_LOCATION.

      To store your ArcGIS Enterprise backups in an Amazon Simple Storage Service (S3) or an S3 compatible bucket storage location, create one specifically for storing backup files generated by the webgisdr utility, and update the S3 properties with the information needed to access your bucket.

      To store your ArcGIS Enterprise backups in Microsoft Azure Blob storage, create an Azure Blob storage container specifically for storing backup files generated by the webgisdr utility, and update the Azure properties with the information needed to access your container.

      Note:

      If your ArcGIS Enterprise organization is on-premises but your backups are stored in the cloud, creating backups and restoring will take longer than it would if you stored your backups in an on-premises file share.

    • BACKUP_LOCATION = <location of on-premises backup file>

      Designate the location for the webgissite backup file.

      Ensure any backslashes in the path are escaped. For example, C:\backupswould be entered as C:\\backups and \\fileserver\backups would be entered as \\\\fileserver\\backups.

      Backup files are initially stored in the SHARED_LOCATION but are copied to the BACKUP_LOCATION. Be sure the location is large enough to hold the backup file. Although the file is compressed, it can be quite large depending on the amount and type of data you have. The account that runs the webgisdr utility must have read and write privileges on the BACKUP_LOCATION.

      If you set BACKUP_LOCATION to a folder, the disaster recovery tool imports the latest backup file available in that folder. If you set BACKUP_LOCATION to a specific backup file in the folder, that file is imported by the disaster recovery tool.

      Note:

      During an export, if it is taking a long time to package the backup, consider setting the BACKUP_LOCATION to a local path. You can then copy the finished package to its intended location. Make sure there is enough space on the local drive to store the backup temporarily.

    • 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 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.

  3. Save changes and close the expfullbackups.properties file.
  4. Make a copy of the expfullbackups.properties file and name it expincremental.properties.
  5. Open the expincremental.properties file in a text editor and change the BACKUP_RESTORE_MODE setting to incremental.
  6. Save changes and close the expincremental.properties file.
  7. 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.

    For example, the line you put in the script to create full backups would contain something similar to the following:

    webgisdr --export --file /arcgis/portal/tools/webgisdr/fullbackups.properties

  8. The scripts you use to export backups need to include a way to copy the backup files to the standby deployment.

    The account that installed ArcGIS Server, Portal for ArcGIS, and ArcGIS Data Store in 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 read and write privileges on the SHARED_LOCATION and the location to which you copy the backup files. The account that installed ArcGIS Server, Portal for ArcGIS, and ArcGIS Data Store in the standby deployment must have at least read privileges on these locations.

  9. 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.
  10. Copy the expfullbackups.properties and expincremental.properties files to the location of the webgisdr.properties file on the standby deployment (/arcgis/portal/tools/webgisdr by default), and rename the files impfullbackups.properties and impincremental.properties, respectively.
  11. Update the SHARED_LOCATION, BACKUP_LOCATION (if the BACKUP_STORE_PROVIDER is set to FileSystem), and PORTAL_ADMIN_URL in the properties for the standby deployment's environment.
  12. Schedule the webgisdr tool to run on the primary and standby deployments. You can do this using a cron job. Define your backup schedule and set up automated tasks to point to the appropriate properties file. The two scripts that will import the backups need to call the properties files you copied to the standby deployment.
    Tip:

    As mentioned in the introduction, you'll need to estimate the time it takes to complete full and incremental backups and to copy the backup files, add a buffer time, and schedule your scripts to run accordingly.