OceanBase Database allows you to back up cluster-level and tenant-level parameters. This provides reference for subsequent restore of clusters and tenants.
Back up cluster-level parameters
The data backup feature does not back up cluster-level parameters. You can manually execute a backup statement to back up them to the specified path. The statement backs up only user-specified cluster-level parameters.
Limitations and considerations
You can back up cluster-level parameters only from the
systenant, but not from a user tenant.The cluster-level parameters
all_server_list,rootservice_list, anddebug_sync_timeoutare not backed up regardless of whether their values are the default values.
Procedure
Log in to the
systenant of the cluster as therootuser.Back up cluster-level parameters from the
systenant.The SQL syntax is as follows:
ALTER SYSTEM BACKUP CLUSTER PARAMETERS TO 'parameters_backup_path';parameters_backup_pathindicates the backup path for cluster-level parameters. You must specify a path as needed. It must be the same as the backup destination for data backup. For more information about the backup destination, see Preparations.Here are some examples:
OSSNFSCOSS3Object storage services compatible with the S3 protocolBack up 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 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 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 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 cluster-level parameters to the
s3://oceanbase-test-bucket/backup/data/cluster_parameters?host=obs.****.myhuaweicloud.com&access_id=****&access_key=****directory of Huawei Cloud Object Storage Service (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 cluster-level parameters to the
s3://oceanbase-test-bucket/backup/data/cluster_parameters?host=https://storage.googleapis.com&access_id=****&access_key=****directory of Google Cloud Storage (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 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 GCS: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
During full data backup or incremental data backup, the system backs up user-specified parameters of a tenant together with its resource configurations to the backup destination. You do not need to perform any additional backup operation.
Notice
The external_kms_info and tde_method parameters contain sensitive encryption information. Therefore, they are not backed up regardless of whether their values are the default values.
What to do next
After the backup is successful, you can obtain the backup files of tenant-level and cluster-level parameters from the specified backup paths. For more information about the backup directories, see Introduction to physical backup and restore
You can run the dump_backup command in ob_admin to parse the backup files to obtain parameter information. For more information, see dump_backup.