Backing up API Gateway Configuration Data
You can back up the API Gateway configuration information and data. At a later stage, you can restore the API Gateway database from the backup archive.
There are two types of backups: data backups and configuration backups.
The data backups are performed using the command tool apigatewayUtil.[bat|sh] create backup. The tool creates a backup archive of the Internal Data Store data.
The configuration backups are performed using the command tool apigw-backup-tenant.[bat|sh]. The tool creates a backup archive of the API Gateway configuration information and data. It is typically used in the disaster recovery scenarios to backup the data periodically and restore the data in the event of any disaster.
The default location of the backed up data is the Integration Server_directory/InternalDataStore/archives directory. You can write the backed up data to the InternalDataStore/archives folder mount from an external NFS or S3 service. API Gateway uses NFS as the default repository in which the backup is stored.
Pre-requisites for Backing up in a Distributed Environment
The following points are to be considered if API Gateway is installed in a clustered high availability setup:
Configure a path to backup the Internal Data Store.
Restart the Internal Data Store.
To backup configurations and data
Run the command apigw-backup-tenant.sh The syntax is of the format: C:/SoftwareAG/IntegrationServer/instances/default/packages/WmAPIGateway/cli/bin>apigw-backup-tenant./sh -backupDestinationDirectory directory_path_to_store_backup_file -backupFileName backup_file_name_without_spaces -backupTemplate file_path_to_backup_template -packagesTemplate file_path_to_packages_template -help
The input parameters are:
Parameter | Description |
-backupDestinationDirectory | Mandatory. Path to the destination folder where you want to create the backup. Example: C:/SoftwareAG/AnotherBackupLocation Specify this option only if you want to create the backup in a local directory or NFS itself. |
-backupFileName | Optional. Name of the file for the data backup. Note: The file name must not contain any spaces. Default value is apigw_disaster_recovery_backup If a file name is not specified, the default value is automatically set for this parameter. |
-backupTemplate | Optional. Path to the configuration backup file. Example: C:/SoftwareAG/tenant-backup-template.txt Note: The paths specified in the backup file should be relative to the Software AG root installation folder <SAGInstallDir> Default value is C:/SoftwareAG/IntegrationServer/instances/instance_name/packages/WmAPIGateway/cli/bin/conf/tenant-backup-template.txt The backup file (tenant-backup-template.txt) contains a list of configuration files and folders that need to be backed up, with one file or folder name in each line. The backup file can also include custom configuration files, that are defined specifically for a particular API Gateway instance. |
-packagesTemplate | Optional. Path to the backup file. This file contains a list of custom packages to be backed up and includes one package name in each line. Default value is conf/tenant-backup-packages.txt |
-help | Optional. Prints the help text summarizing the input parameters of this command. |
The apigw-backup-tenant command creates the following entries in -backupDestinationDirectory:
A ZIP file with the name specified for the parameter
-backupFileName. This ZIP file contains the backup of
API Gateway configurations.
If a file name is not specified in this parameter, then the command creates a ZIP file named -backupFileName.zip.
Directory named
default. This directory contains the backup of Internal Data Store.
The command also creates a backup log file named backup-tenant.log in the SAGInstallDir/IntegrationServer/instances/instance_name/packages/WmAPIGateway/cli/bin directory.