API Gateway 10.11 | Administering API Gateway | Operating API Gateway | Data Management | Data Backup | Advanced Backup Options | Deleting a Backup File
 
Deleting a Backup File
You can delete backups that are older than your data retention period and no more required.
As stated earlier, API Gateway backups are snapshots of data taken incrementally. These snapshots are logically independent from each other, even within a single repository. Hence, deleting a backup file does not affect the integrity of any other backup file.
CAUTION:
Use the delete backup command instead of deleting manually.
*To delete a backup file
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 delete a backup file:
Linux
./apigatewayUtil.sh delete backup -name backup-file-name
Windows
apigatewayUtil.bat delete backup -name backup-file-name
Tip:
To determine the backup files for deleting, you can view the list of backup files with the verbose parameter set as true. For information on viewing the list of backup files, see Viewing Backup Files List.
You can provide the following parameters based on your requirements:
Parameter
Description
tenant
Name of the tenant in which the backup file is located.
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 from which you want to delete the backup file.
If you do not provide this parameter, the value is picked from the tenant parameter.
olderThan
Option to delete the backup files that were created earlier than the given number of days. You must provide this parameter with the required number of days as seen in the following example:
apigatewayUtil.bat delete backups -olderThan 10
This command deletes the backup files that were created earlier than the past 10 days.
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.