Software AG Products 10.7 | Configuring API Gateway | API Gateway Data Management | Backing up API Gateway Configuration Data
 
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.
The configuration backups are performed using the following commands:
*apigw-backup-tenant.bat - Windows.
*apigw-backup-tenant.sh - Linux.
This command 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 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.
Note:
The following scripts will not be available from release above 10.7; and you must use the apigatewayUtil.bat (Windows) or apigatewayUtil.sh (Linux) scripts instead of these scripts:
Operating system
Scripts
Windows
apigw-backup-packages.bat,
apigw-backup-tenant.bat, and
apigw-upgrade-backup.bat
Linux
apigw-backup-packages.sh,
apigw-backup-tenant.sh, and
apigw-upgrade-backup.sh
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 API Gateway Data Store.
*Restart the API Gateway Data Store.
*To backup configurations and data
*Run one of the following commands depending on your operating system:
*Windows -
C:/SoftwareAG/IntegrationServer/instances/default/packages/WmAPIGateway/cli/bin>
apigw-backup-tenant.bat -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
*Linux -
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
In the example, the backup command is run with the -backupDestinationDirectory and -backupFileName parameters.
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. Name of the backup template along with its location.
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. Name of the backup packages template along with its location. 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 apigw_disaster_recovery_backup.zip.
*A folder named, default, within the zip file. This folder contains the backup of API Gateway configuration data.
The backup command also creates a backup log file named backup-tenant.log in the SAGInstallDir/IntegrationServer/instances/instance_name/packages/WmAPIGateway/cli/bin directory.