Restoring API Gateway Configuration Data
You use the command tool apigw-restore-tenant.[bat|sh] to restore previously archived configuration files and data on an API Gateway instance.
Note:
Restoring overwrites the existing content in your API Gateway instance.
Pre-requisites for Restoring in a Distributed Environment
The following points are to be considered if API Gateway is installed in a clustered high availability setup:
The
API Gateway Data Store must be active in only a single node in the cluster.
The
API Gateway instance should be up and running.
To restore configurations and data
Run the command apigw-restore-tenant.sh The syntax is of the format: C:/SoftwareAG/IntegrationServer/instances/default/packages/WmAPIGateway/cli/bin>apigw-restore-tenant./sh -backupFileName <backup_file_name_without_spaces> -backupDestinationDirectory <directory_path_to_store_backup_file> -filesToSkip <file_path_to_files_to_skip> -skipDataRestore -help
The input parameters are:
Parameter | Description |
-backupDestinationDirectory | Mandatory. Path to the destination folder where the backup is available. Example: C:\SoftwareAG\AnotherBackupLocation Specify this option only if you want the backup is available in a local directory or NFS itself. |
-backupFileName | Mandatory. Name of the file for the data backup. Note: The file name must not contain any spaces. |
-filesToSkip | Optional. Path to the data restore file. Example: C:\SoftwareAG\skip-files.txt Note: The paths specified in the restore 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\skip-files.txt The restore file (skip-files.txt) contains a list of configuration files and folders that need to be restored in the API Gateway instance, with one file or folder name in each line. If you do not want to restore a specific configuration file, you can remove it from this restore file. |
-skipDataRestore | Optional. Skips restoring of the API Gateway Data Store (Elasticsearch) data. |
-help | Optional. Prints the help text summarizing the input parameters of this command. |
The apigw-restore-tenant command creates a restore log file named restore-tenant.log in the <SAGInstallDir>\IntegrationServer\instances\{instance_name}\packages\WmAPIGateway\cli\bin directory.
Note:
The apigw-restore-tenant command automatically restarts the API Gateway instance.
Post-requisites in a Distributed Environment
If the
API Gateway Data Store in active node does not start automatically, manually restart the
API Gateway Data Store.
Start the
API Gateway Data Store in all other nodes in the cluster. This is important to synchronize the data on a restored
API Gateway instance with all other nodes in the cluster.
The
API Gateway configuration files should be restored separately for each individual
API Gateway instance in the clustered environment.
Run the command apigw-restore-tenant with the parameter -skipDataRestore. This restores the API Gateway configuration files without restoring the API Gateway Data Store data in all other nodes in the cluster.