Directory structure of log archiving
You can specify the time interval for splitting log archiving directories by using the PIECE_SWITCH_INTERVAL parameter. By default, log archiving directories are split by day. Each log data directory corresponds to one backup piece.
For backup media such as NFS, OSS, and Azure Blob, the directory structure of log archiving is as follows:
log_archive_dest
├── check_file
│ └── 1002_connect_file_20230111T193049.obbak // Connectivity check file
├── format.obbak // Formatted information of the backup path
├── rounds // Placeholder directory for Rounds
│ └── round_d1002r1_start.obarc // Placeholder for the start of a Round
├── pieces // Placeholder directory for Pieces
│ ├── piece_d1002r1p1_start_20230111T193049.obarc // Placeholder for the start of a Piece, named as piece_DESTID_ROUNDID_PIECEID_start_DATE
│ └── piece_d1002r1p1_end_20230111T193249.obarc // Placeholder for the end of a Piece, named as piece_DESTID_ROUNDID_PIECEID_end_DATE
└── piece_d1002r1p1 // Directory for a Piece, named as piece_DESTID_ROUNDID_PIECEID
├── piece_d1002r1p1_20230111T193049_20230111T193249.obarc // Records the continuous interval of the Piece
├── checkpoint
├── single_piece_info.obarc // Records the metadata of the Piece
├── tenant_archive_piece_infos.obarc // Records the metadata of all frozen Pieces before the current Piece
├── file_info.obarc // List of all log stream files
├── logstream_1 // Log stream 1
└── logstream_1001 // Log stream 1001
In the above directory structure, the top-level directory contains the following data:
format.obbak: Records the metadata of the archiving path, including information about the tenant using the path.check_file: Used for connectivity check of the log archiving directory.rounds: A list of all Rounds in the log archiving process.pieces: A list of all Pieces in the log archiving process.piece_d1002r1p1: The directory for a Piece, named aspiece_DESTID_ROUNDID_PIECEID. Here,DESTIDis the id corresponding tolog_archive_dest;ROUNDIDis the id of the log archiving Round, which is a monotonically increasing integer; andPIECEIDis the id of the log archiving Piece, which is also a monotonically increasing integer.Inside a log archiving Piece directory, the following data is stored:
piece_d1002r1p1_20230111T193049_20230111T193249.obarc: This file shows the id, start time, and end time of the current Piece and is used only for information display.checkpoint: The directory for recording the archiving point of an active Piece. The ObArchiveScheduler module regularly updates the archiving point information in this directory. Specifically:single_piece_info.obarc: Records the metadata of the current Piece.tenant_archive_piece_infos.obarc: Records the metadata of all frozen Pieces in the current tenant.file_info.obarc: Records the list of log stream files in the Piece.logstream_1: The directory for storing log files of log stream 1, which is the system log stream of the OceanBase Database tenant.logstream_1001: The directory for storing log files of log stream 1001. Log streams with IDs greater than 1000 are user log streams of the OceanBase Database tenant.
Directory structure of data backup
A single data backup corresponds to a backup_set. Each time you run ALTER SYSTEM BACKUP DATABASE, a new backup_set directory is generated, which contains all the data from the current backup.
The directory structure of data backup is as follows:
data_backup_dest
├── format.obbak // Backup path formatting information
├── check_file
│ └── 1002_connect_file_20230111T193020.obbak // Connectivity check file
├── backup_sets // Summary directory for data backups, recording all data backup sets
│ ├── backup_set_1_full_end_success_20230111T193420.obbak // Full backup end placeholder
│ ├── backup_set_1_full_start.obbak // Full backup start placeholder
│ ├── backup_set_2_inc_start.obbak // Incremental backup start placeholder
│ └── backup_set_2_inc_end_success_20230111T194420.obbak // Incremental backup end placeholder
└── backup_set_1_full // Full backup set, files ending with "full" indicate full backups, and "inc" indicate incremental backups
├── backup_set_1_full_20230111T193330_20230111T193420.obbak // Placeholder showing the start and end times of the full backup
├── single_backup_set_info.obbak // Metadata of the current backup set
├── tenant_backup_set_infos.obbak // Full backup set information for the current tenant
├── infos
├── logstream_1 // Log stream 1
└── logstream_1001 // Log stream 1001
In the data backup directory, the top-level directory contains the following three types of data:
format.obbak: Records the metadata of the backup path.check_file: Used for connectivity checks of the user data backup directory.backup_sets: A summary directory for data backups, recording all data backup sets.backup_set_1_full: This directory represents a data backup set. The directory name ending withfullindicates a full backup, andincindicates an incremental backup. Each data backup generates a corresponding backup set, which remains unchanged after the backup is completed.Within a data backup set, the following data is primarily included:
backup_set_1_full_20230111T193330_20230111T193420.obbak: This file displays the ID, start, and end times of the current backup set. It is only for informational purposes.single_backup_set_info.obbak: Records the metadata of the current backup set, including backup points and dependent logs.tenant_backup_set_infos.obbak: Records the metadata of all existing backup sets for the current tenant.infos: Records the metadata of the data backup set.logstream_1: Records all data of log stream 1, which is the system log stream for the OceanBase Database tenant.logstream_1001: Records all data of log stream 1001. Log streams with IDs greater than 1000 are user log streams for the OceanBase Database tenant.
Cluster-level parameter backup directory
Each time a cluster-level parameter backup is initiated, the system generates a backup file in the specified directory. The specific directory structure is as follows:
cluster_parameters_backup_dest
├── cluster_parameter.20240710T103610.obbak # Non-default cluster-level parameter information, file naming format: `cluster_parameter.[timestamp]`
└── cluster_parameter.20241018T140609.obbak