Querying and Downloading Binlogs (OBT)
Binlogs record all DDL and DML statements (except data query statements). You can download binlogs to a local PC for further analysis.
This section describes how to enable binlog, and then query and download binlogs on the TaurusDB console.
Billing
Binlogs are stored in OBS buckets. For the billing details, see How Is TaurusDB Backup Data Billed?
Prerequisites
- Binlog can only be enabled when the following conditions are met:
- If the kernel version is earlier than 2.0.45.230900, set log-bin to ON. You need to reboot the instance to apply the change. For details about the impact and precautions for rebooting an instance, see Rebooting a DB Instance. You can view or change parameter values by referring to Modifying Parameters of a DB Instance.
- If the kernel version is 2.0.45.230900 or later, set rds_global_sql_log_bin to ON. The change is applied immediately. There is no need to reboot the instance.
For details about how to check the kernel version, see How Can I Check the Version of a TaurusDB Instance?
- Before viewing and downloading binlogs, you need to enable binlog by referring to Enabling Binlog.
Constraints
- To use binlogs, set log-bin or rds_global_sql_log_bin to ON. To query or download binlogs on the management console, submit a service ticket.
- Enabling binlog does not affect SELECT operations, but affects INSERT, UPDATE, DELETE and other write operations. There are no significant differences between TaurusDB binlog and open-source MySQL binlog. The binlog syntax of TaurusDB is fully compatible with that of open-source MySQL.
Enabling Binlog and Querying and Downloading Binlogs
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page and choose Databases > TaurusDB.
- On the Instances page, click the instance name.
- In the navigation pane, choose Logs.
- Click the Binlog tab.
- Click Configure Binlog. In the displayed dialog box, enable Binlog and set Retention Period. The retention period ranges from 1 to 180 days.
Figure 1 Configuring binlog
- Click OK.
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page and choose Databases > TaurusDB.
- On the Instances page, click the instance name.
- In the navigation pane, choose Logs.
- Click the Binlog tab.
- Click Configure Binlog. In the displayed dialog box, disable Binlog.
Existing binlogs will be automatically deleted at the end of the retention period. Deleted logs cannot be restored. Exercise caution when disabling binlog.
- Click OK.
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page and choose Databases > TaurusDB.
- On the Instances page, click the instance name.
- In the navigation pane, choose Logs.
- Click the Binlog tab.
- View binlogs 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 2 Selecting a time range
- Click Download in the Operation column to download a binlog to a local PC.
- View binlogs 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot