Issues with TiDB Cluster Backup

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb集群备份问题

| username: emerson_cai

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots / Logs / Monitoring]

Purpose: To back up the cmdb database (there are many databases in the cluster, but currently only the cmdb database needs to be backed up) daily at a scheduled time, and save the backup files to another location for recovery in case of failure or data corruption.

How to solve this issue?
tiup br backup full --pd “” --backupts ‘2024-04-10 11:54:08’ --storage local:///data/tidb_backup/temp

Since this command does not support Alibaba Cloud’s OSS, as shown below, we currently plan to back up the data to the server directory and then upload or copy it through other means.

| username: xfworld | Original post link

If it really doesn’t work, set up an NFS and mount it to each node, then transfer the backup results from the NFS to OSS…

| username: 有猫万事足 | Original post link

The second floor’s suggestion is very reliable. You can take a look at the link above; this is how backups are done.

However, Alibaba Cloud claims it is compatible with S3, so ideally, setting provider=alibaba should solve the issue. After all, this would be the best solution. If you have time, I think it’s worth trying to tinker with it.

| username: 啦啦啦啦啦 | Original post link

Try referring to this: 专栏 - TiDB 使用国内公有云和私有部署的 S3 存储备份指南 | TiDB 社区

| username: ffeenn | Original post link

You can upload it directly. If it is a backup of a specific database, you need to specify it.

| username: zhang_2023 | Original post link

It’s very convenient to have a shared companion.

| username: 舞动梦灵 | Original post link

I recommend using Alibaba Cloud’s NAS. My Alibaba Cloud backup is designated to Alibaba Cloud’s NAS. All servers are mounted, and you just need to specify the path directly. There are no issues with restoring backups to other clouds.

| username: tidb菜鸟一只 | Original post link

You can simply set up MinIO to store backup data. Column - Simple Test of Installing Standalone MinIO via Docker for BR Backup and Restore Data through S3 Storage | TiDB Community
If you are only backing up the cmdb database, use the backup db command instead of a full backup.
The error you encountered is due to TS timeout. Increase the tikv_gc_life_time a bit:
SET GLOBAL tidb_gc_life_time=“60m”;

| username: TiDBer_QYr0vohO | Original post link


| username: dba远航 | Original post link

Mount it locally, and then directly back it up.