This topic describes the architecture and storage mechanism of data backup.
Data backup architecture
Data backup preferentially uses a follower replica for backup.
Storage mechanism of data backup files
The native NFS protocol performs poorly in handling a large number of small files (for example, tens of millions of 2 MB files). To address this issue, OceanBase Database introduced aggregated storage for data backup in V4.x. Specifically, data backup files are packaged and stored in backup units (backup items), with each backup unit containing SSTable metadata, tablet metadata, and macroblock objects. By aggregating 2,048 backup units (with a maximum size of 2 MB each) in a batch, you can reduce the number of small files. The number of backup units aggregated in a batch (backup_data_file_size/2 MB) can be adjusted using the tenant-level parameter backup_data_file_size. The sizes of macroblocks and metadata are different, so the sizes of aggregated files are also different.
