Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 生产库全备问题
[TiDB Usage Environment]
Production Environment
[TiDB Version]
tidb v5.4.0
[Issue and Impact]
Requirement: How to fully back up the entire cluster and restore it to the most recent point in time when a failure occurs.
Is it possible to restore the entire cluster similar to Oracle’s RMAN backup (full backup + incremental backup + latest log files)?
My current idea is: use BR for full backup (restore to a certain point in time) + binlog for incremental backup. I am not sure if this solution is feasible or how it should be implemented.
Feasible,
BR can do full backup (restore to a certain point in time),
Binlog can be parsed using Reparo.
To achieve point-in-time recovery, you need to use TiDB-Binlog. Configure Drainer with syncer.db-type: “file” to output binlog logs. For PITR, first use BR to restore the full backup, then use the timestamp from the backup set as the starting time, and apply the binlog logs back to TiDB using the reparo tool.
Using multiple tools feels a bit cumbersome. After outputting the binlog to a file and changing the start time, you need to restore it. So, do you need to ensure that the binlog time is after the full backup of BR? For example, if I do a full backup with BR once a day, then set the binlog time to 7 days.
Yes, to achieve PITR, it is necessary to ensure that all binlogs after the BR backup timestamp are not lost.
The scale is not very large. Currently, we plan to use BR for daily full backups because it’s fast. So, I’ll add an incremental backup using binlog. I haven’t done this part before . I’m not sure if binlog has any impact on performance.
What is the impact of enabling Binlog on TiDB’s performance?
It would be great when TiDB’s BR tool can achieve PITR.
We are working on it as planned and currently testing. If everything goes smoothly, it is expected to go live in about 2 months.
Isn’t binlog an enterprise version tool that requires a paid solution?
The community edition includes tidb-binlog.
This topic was automatically closed 1 minute after the last reply. No new replies are allowed.