You can call the PurgeDBInstanceLog operation to delete log backup files from an ApsaraDB RDS instance.

ApsaraDB RDS allows an instance to automatically upload log backup files to Object Storage Service (OSS) buckets. If the remaining storage space of an instance is insufficient, ApsaraDB RDS also allows you to manually upload the log backup files of the instance to OSS buckets. After the log backup files of an instance are uploaded, ApsaraDB RDS deletes these files from the instance to release storage space.

This operation is called to upload log backup files from an instance to OSS buckets and then delete these files from the instance. If the instance runs SQL Server, transaction log backup files are compressed before they are uploaded. For more information about log backups, see Back up an ApsaraDB RDS for MySQL instance or Back up an ApsaraDB RDS for SQL Server instance.

Note
  • This operation is supported only for instances that run MySQL or SQL Server.
  • When you upload log backup files, the data restoration feature is not affected.
  • This operation is called to release storage space. The backup storage usage is not reduced.
  • The OSS buckets to which log backup files are uploaded are provided by ApsaraDB RDS. You do not need to purchase these OSS buckets. In addition, you cannot access these OSS buckets.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer automatically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes PurgeDBInstanceLog

The operation that you want to perform. Set the value to PurgeDBInstanceLog.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

ClientToken String No ETnLKlblzczshOTUbOCzxxxxxxxxxx

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Response parameters

Parameter Type Example Description
RequestId String 65BDA532-28AF-4122-AA39-B382721EEE64

The ID of the request.

Examples

Sample requests

http(s)://rds.aliyuncs.com/? Action=PurgeDBInstanceLog
&DBInstanceId=rm-uf6wjk5xxxxxxx
&<Common request parameters>

Sample success responses

XML format

<PurgeDBInstanceLogResponse>
	  <RequestId> 65BDA532-28AF-4122-AA39-B382721EEE64</RequestId></PurgeDBInstanceLogResponse>

JSON format

{
  "RequestId": " 65BDA532-28AF-4122-AA39-B382721EEE64"
}

Error codes

For a list of error codes, visit the API Error Center.