TiDB Data Backup

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

Original topic: tidb数据备份

| username: TiDBer_7Q5CQdQd

  • --storage: The storage address where the data is backed up. Snapshot backup supports Amazon S3, Google Cloud Storage, and Azure Blob Storage as backup storage. The above command uses Amazon S3 as an example. For detailed storage address formats, please refer to URI format of external storage services.
    Does TiDB data backup only support these cloud services? Does it support Kingsoft Cloud KS3 or local disk storage?
| username: tidb菜鸟一只 | Original post link

Local disks are supported, but each TiKV node needs to have disks with the same name, or you can directly use NFS. It also supports all S3 protocol cloud storage, and self-built MinIO is also fine.

| username: xingzhenxiang | Original post link

I think using the MinIO S3 protocol for backups is the simplest, as it doesn’t require operations on each TiKV.

| username: 像风一样的男子 | Original post link

The most common and simplest way is to find an idle server disk, set up an NFS share, and then mount it to all KV nodes.

| username: TiDBer_7Q5CQdQd | Original post link

If Kingsoft Cloud KS3 also supports the S3 protocol, can it be used?

| username: MrSylar | Original post link

The official team probably hasn’t tested Kingsoft Cloud KS S3, but theoretically, anything compatible with S3 should work. For example, I use Tencent Cloud here. Ultimately, it’s best to rely on your own actual test results.

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

Sure, as long as it supports the S3 protocol.

| username: zhanggame1 | Original post link

NFS is fine, the local hard drive will definitely work.

| username: 这里介绍不了我 | Original post link

I think connecting a NAS is the most convenient.

| username: Kongdom | Original post link

I suggest testing it yourself~

| username: zhang_2023 | Original post link

Directly mount the backup server directory locally.

| username: xingzhenxiang | Original post link

The local disk video mentioned that merging is required, which also adds to the operational steps.

| username: andone | Original post link

NFS network shared disk

| username: zhh_912 | Original post link

As long as it’s data, it should be supported.

| username: 哈喽沃德 | Original post link

Setting up a local shared drive is the safest option, and data recovery is also fast. This is assuming you are not considering off-site backups.

| username: 随缘天空 | Original post link

All S3-compatible systems are supported, including local storage. If you want to use local storage, you can set up a distributed file sharing system. You can refer to the following link: https://juejin.cn/post/7265598703746580516