View binlogs

Last Updated: Dec 06, 2017


Query the Binlog files of an instance (only supports MySQL instance), supporting querying by page.

RDS provides Binlog file downloads:

  • When the DownloadLink is NULL, this indicates that RDS has not provided a download URL.

  • When DownloadLink is not NULL, you can use this URL to download the backup file through wget (add double quotes), a browser, or programming. The expiration time for this URL is LinkExpiredTime. Use it before the expiration time. If it has expired, you can see the following error code during the download:

    1. <?xml version="1.0" encoding="UTF-8" ?>
    2. <Error>
    3. <Code>AccessDenied</Code>
    4. <Message>Request has expired.</Message>
    5. <Expires>2012-12-25T09:47:52.000Z</Expires>
    6. <ServerTime>2012-12-25T09:49:00.000Z</ServerTime>
    7. <RequestId>50D9768CA801C2F102005C70</RequestId>
    8. <HostId></HostId>
    9. </Error>

Request parameters

Name Type Required? Description
Action String Yes Required parameter. Value: DescribeBinlogFiles.
DBInstanceId String Yes Instance ID.
StartTime String Yes Query start time. Format: yyyy-MM-dd’T’HH:mm:ssZ.
EndTime String Yes Query end time, which must be later than the query start time. Format: yyyy-MM-dd’T’HH:mm:ssZ.
PageSize Integer No Number of records on every page. Values: 30, 50, and 100; default value: 30.
PageNumber Integer No Page number, which must be greater than 0, but must not exceed the maximum Integer value. Default value: 1.

Return parameters

Name Type Description
<Public Return Parameters> - For more information, see Public parameters.
TotalRecordCount Integer Total number of binlog files.
PageNumber Integer Page number.
PageRecordCount Integer Number of binlog files displayed on the current page.
Items List<BinLogFile> - -

BinLogFile parameters

Name Type Description
FileSize Long Binlog file size, in the unit of bytes.
LogBeginTime String Start time for binlog file recording.
LogEndTime String End time for binlog file recording.
DownloadLink String HTTP-compliant download URL. If this parameter is set to NULL, no download URL exists.
LinkExpiredTime String URL expiration time, for example, 2011-06-11T15:00:00Z.


  • Request example

    2. &DBInstanceId=riauvjz6zajfiq6ba1370329449201
    3. &StartTime=2011-06-11T15:00:00Z
    4. &EndTime=2013-06-05T15:00:00Z
    5. &<Public Request Parameters>
  • Return example

    XML format:

    1. <DescribeBinlogFilesResponse>
    2. <RequestId>66816822-CEC1-4C8D-AB26-2530A7D4DCA5</RequestId>
    3. <TotalRecordCount>1</TotalRecordCount>
    4. <PageNumber>1</PageNumber>
    5. <PageRecordCount>1<PageRecordCount>
    6. <Items>
    7. <BinLogFile>
    8. <FileSize>123</FileSize>
    9. <LogBeginTime>2013-06-01T15:00:00Z</LogBeginTime>
    10. <LogEndTime>2013-06-02T18:00:00Z</LogEndTime>
    11. <DownloadLink>http://rdslog-</DownloadLink>
    12. <LinkExpiredTime>2013-06-09T18:00:00Z</LinkExpiredTime>
    13. </BinLogFile>
    14. </Items>
    15. </DescribeBinlogFilesResponse>

    JSON format:

    1. {
    2. "RequestId":"66816822-CEC1-4C8D-AB26-2530A7D4DCA5"
    3. "PageNumber":1,
    4. "TotalRecordCount":1,
    5. "PageRecordCount":1
    6. "Items":
    7. {"BinLogFile":
    8. [
    9. {
    10. FileSize:”123
    11. LogBeginTime:”2013-06-01T15:00:00Z
    12. LogEndTime:”2013-06-02T18:00:00Z
    13. DownloadLink:””
    14. LinkExpiredTime2013-06-09T18:00:00Z
    15. }
    16. ]
    17. }
    18. }
Thank you! We've received your feedback.