Help Center/ TaurusDB/ User Guide/ Logs and Auditing/ Querying and Downloading Binlog Files (OBT)
Updated on 2024-12-30 GMT+08:00

Querying and Downloading Binlog Files (OBT)

Binlog files record all DDL and DML statements (except data query statements). You can download binlog files to a local PC for further analysis.

This section describes how to enable binlog, and then query and download binlog files.

Billing

Binlog backup data is stored in OBS buckets. For the billing details, see How Is TaurusDB Backup Data Billed?

Prerequisites

  • Binlog can be only enabled when the following conditions are met:
    • If the kernel version of your DB instance is earlier than 2.0.45.230900, the value of log-bin must be ON. To view and modify the parameter value, see Modifying Parameters of a DB Instance.
    • If the kernel version of your DB instance is 2.0.45.230900 or later, the value of rds_global_sql_log_bin must be ON.
  • Before viewing and downloading binlog files, you need to enable binlog by referring to Enabling Binlog.

Enabling Binlog

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page, choose Databases > TaurusDB.
  4. On the Instances page, click the instance name.
  5. In the navigation pane, choose Logs.
  6. Click the Binlog tab.
  7. Click Configure Binlog. In the displayed dialog box, enable Binlog and set Retention Period.

    Figure 1 Configuring binlog
    • The retention period ranges from 1 to 180 days.
    • After binlog is disabled, the generated logs will be automatically deleted after the retention period expires. Deleted logs cannot be restored. Exercise caution when disabling binlog.

Querying and Downloading Binlog Files

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page, choose Databases > TaurusDB.
  4. On the Instances page, click the instance name.
  5. In the navigation pane, choose Logs.
  6. Click the Binlog tab.

    Figure 2 Viewing binlog files
    • View binlog files generated in the last 15 minutes, last 30 minutes, last 1 hour, last 24 hours, last 7 days, last 30 days, or a custom time range.
      Figure 3 Selecting a time range

    • Click Download in the Operation column to download a binlog file to a local PC.