This topic describes the architecture and storage mechanism of data backup.
Data backup architecture
Data backup preferentially uses a follower replica for backup. The data backup architecture is shown in the following figure.
Storage mechanism of data backup files
In data backup scenarios, the native NFS protocol performs poorly when it handles a large number of small files (for example, tens of millions of 2 MB files). To address this issue, OceanBase Database introduced the data aggregation storage mechanism in V4.x. Specifically, each backup item is packaged and stored to reduce the number of small files. A backup item includes three types of data: SSTable metadata, tablet metadata, and macroblocks. By default, 2,048 backup items (each not larger than 2 MB) are aggregated into a file. The number of backup items (backup_data_file_size/2 MB) aggregated at a time can be adjusted by using the tenant-level configuration item backup_data_file_size. Since the sizes of metadata and macroblocks can vary, the sizes of the generated aggregate files can also vary.
