OceanBase Database supports backing up tenant-level and cluster-level parameters. These backups provide configuration references for quickly restoring the status of clusters and tenants in the future.
Back up cluster-level parameters
Cluster-level parameters are not included in data backups. To back up cluster-level parameters, you need to manually execute a command to save the original cluster-level parameters to a specified path (only non-default parameters within the cluster scope are backed up).
Limitations and considerations
Cluster-level parameters can only be backed up from the
systenant. You cannot back up cluster-level parameters from a user tenant.When backing up cluster-level parameters, parameters such as
all_server_list,rootservice_list, anddebug_sync_timeoutare not backed up, regardless of whether their values are default or not.
Procedure
Log in to the
systenant of the cluster as therootuser.Execute the following SQL statement to back up the cluster-level parameters.
The sample SQL statement is as follows:
ALTER SYSTEM BACKUP CLUSTER PARAMETERS TO 'parameters_backup_path';In this statement,
parameters_backup_pathis the destination path for backing up cluster-level parameters, which must be specified by users. The path requirements are the same as those for the destination path of data backup. For more information, see Prepare for backup.Here is an example:
Alibaba Cloud OSSNFSTencent Cloud COSAWS S3S3 protocol-compatible object storage services that supportBack up the cluster-level parameters to the
oss://oceanbase-test-bucket/backup/cluster_parameters?host=***.aliyun-inc.com&access_id=***&access_key=***directory:obclient> ALTER SYSTEM BACKUP CLUSTER PARAMETERS TO 'oss://oceanbase-test-bucket/backup/cluster_parameters?host=***.aliyun-inc.com&access_id=***&access_key=***';Back up the cluster-level parameters to the
file:///data/nfs/backup/cluster_parametersdirectory:obclient> ALTER SYSTEM BACKUP CLUSTER PARAMETERS TO 'file:///data/nfs/backup/cluster_parameters';Back up the cluster-level parameters to the
cos://oceanbase-test-appid/backup/cluster_parameters?host=cos.ap-xxxx.myqcloud.com&access_id=***&access_key=***&appid=***directory:obclient> ALTER SYSTEM BACKUP CLUSTER PARAMETERS TO 'cos://oceanbase-test-appid/backup/cluster_parameters?host=cos.ap-xxxx.myqcloud.com&access_id=***&access_key=***&appid=***';Back up the cluster-level parameters to the
s3://oceanbase-test-bucket/backup/data/cluster_parameters?host=s3.***.amazonaws.com&access_id=****&access_key=****&s3_region=****directory:obclient> ALTER SYSTEM BACKUP CLUSTER PARAMETERS TO 's3://oceanbase-test-bucket/backup/data/cluster_parameters?host=s3.***.amazonaws.com&access_id=****&access_key=****&s3_region=****';Back up the cluster-level parameters to the
s3://oceanbase-test-bucket/backup/data/cluster_parameters?host=obs.****.myhuaweicloud.com&access_id=****&access_key=****directory of Huawei OBS:obclient> ALTER SYSTEM BACKUP CLUSTER PARAMETERS TO 's3://oceanbase-test-bucket/backup/data/cluster_parameters?host=obs.****.myhuaweicloud.com&access_id=****&access_key=****';Back up the cluster-level parameters to the
s3://oceanbase-test-bucket/backup/data/cluster_parameters?host=https://storage.googleapis.com&access_id=****&access_key=****directory of GCS:obclient> ALTER SYSTEM BACKUP CLUSTER PARAMETERS TO 's3://oceanbase-test-bucket/backup/data/cluster_parameters?host=https://storage.googleapis.com&access_id=****&access_key=****';Back up the cluster-level parameters to the
s3://oceanbase-test-bucket/backup/data/cluster_parameters?host=cos.ap-xxxx.myqcloud.com&access_id=***&access_key=***directory of COS:obclient> ALTER SYSTEM BACKUP CLUSTER PARAMETERS TO 's3://oceanbase-test-bucket/backup/data/cluster_parameters?host=cos.ap-xxxx.myqcloud.com&access_id=***&access_key=***';
Back up tenant-level parameters
When you initiate a full data backup or initiate an incremental data backup, the system automatically backs up the tenant-level parameters (non-default tenant scope parameters) and the tenant's resource configurations as part of the tenant data to the backup destination without the need to perform additional backup operations.
Notice
Parameters external_kms_info and tde_method contain sensitive encryption-related information. Therefore, regardless of whether their values are default, these parameters are not backed up.
What to do next
After the backup is successful, you can obtain the backup files of the tenant-level and cluster-level parameters from the destination path that you specified earlier. For more information about the directory structure of the backup parameters, see Physical backup and restore.
After you obtain the backup files of the parameters, you can use the dump_backup command of the ob_admin tool to parse the files and obtain the parameters. For more information, see dump_backup.