API Gateway 10.11 | Administering API Gateway | Operating API Gateway | Data Management | Data Backup | Advanced Backup Options | Creating Backup of specific Indexes
 
Creating Backup of specific Indexes
API Data Store contains multiple indexes. Different indexes are used to store different types of data. So, to take a backup of a particular data, you can take a backup of a specific index or set of indexes. For the list of indexes available in API Data Store, see List of Indexes that can be included in backup.
*To take a backup of the required indexes
1. From the command prompt, go to SAGInstallDir/IntegrationServer/instances/default/packages/WmAPIGateway/cli/bin.
Note:
Replace default with the corresponding instance name.
2. Run the following command to create a backup of specific indexes in the default location:
Linux
./apigatewayUtil.sh create backup -indices list of indexes separated by comma
Windows
apigatewayUtil.bat create backup -indices list_of_indexes separated by comma
The following sample shows the creation of a backup of the file indexes, gateway_default_aliases-000001 and gateway_default_truststores-000001, on Windows. The backup is created in the default location, SAGInstallDir/InternalDataStore/archives/.
C:\SoftwareAG\IntegrationServer\instances\default\packages\WmAPIGateway\cli\bin>apigatewayUtil.bat create backup
-indices gateway_default_aliases-000001, gateway_default_truststores-000001

Initiated backup process for default-2021-may-17-22-23-2-266000000 file
For the list of indexes that you can provide with the indices parameter, see List of Indexes that can be backed up individually.
Similar to the list of parameters used during backup creation, you can provide parameters except the include parameter. So, the list of parameters to customize the backup of specific indexes as per your requirements are:
Parameter
Description
name
Name of the backup file. You can provide alphanumeric values and the following special characters: !, @, $, % , ( , ).
If you do not provide any name for the backup file, the script generates a name with the current time and the value provided for the tenant parameter. For example, default-2021-may-17-22-23-2-266000000.
Note:
Do not use uppercase in the name.
tenant
Name of the tenant in which the data exists.
If you do not provide this parameter, the value is picked from pg.gateway.elasticsearch.tenantId property in config.properties file located at IntegrationServer\instances\instance_name\packages\WmAPIGateway\config\resources\elasticsearch.
repoName
Name of the repository where the backup must be saved.
If you do not provide this parameter, the value is picked from the tenant parameter.
debug
Option to specify whether you want to activate debugging when creating a backup. Available levels are:
*true. Displays detailed information on the backup process when the script is run. In most cases, the output printed with the debug parameter is helpful to troubleshoot the issue.
*false. Does not display detailed information. The value is considered as false, when this parameter is not provided.
logLevel
Level of log that you want to create. Log levels indicate the severity of logs. Available levels are:
*Info. Provides the list of regular events that occur during the process. These events are informative.
*Debug. Provides the events that could be useful, if you have to debug the process.
*Warning. Indicates unexpected events that occurred during the process. Usually, these events do not interrupt or have an immediate effect on the process.
*Error. Indicates the events that stop the functionality from working as designed.
*Trace. Provides the list of events in a much detailed manner that could be useful for debugging.
You can specify one of the log level with the logLevel parameter. For example, to create a log file of Warning level when listing backup files, you can run the following command:
apigatewayUtil.bat list backup -logLevel warning
When you provide Error as the log level, then only the error level logs are saved. When you provide Debug as the log level, then Debug, Info, Warning and Error level logs are saved. When you provide Trace as log level, then all level logs are saved.
This parameter is optional. If you do not specify the parameter, then the Info level logs are saved by default.
logFileLocation
Location where you want to save the log file.
For example, to save the log file in C:/apiglogs/backups, you can provide the location as seen in the following example:
apigatewayUtil.bat create backup -name samplebackup
-logFileLocation C:/apiglogs/backups
This parameter is optional. If you do not specify the parameter, the logs are saved in the following location SAGInstallDir/IntegrationServer/instances/instance_name/packages/WmAPIGateway/cli/logs/APIGWUtility.log.