During log backup or secondary log backup, you can update access_id and access_key for Alibaba Cloud Object Storage Service (OSS) in the backup destination as needed.
Prerequisites
The backup destination is configured in the
backup_destorbackup_backup_destparameter.The current user can operate the backup destination.
Feature limitations
You can update
access_idandaccess_keyonly for a backup destination configured in thebackup_destorbackup_backup_destparameter.If a backup task is being executed in the current cluster, you cannot update
access_idoraccess_keyfor OSS configured in thebackup_destparameter.If a secondary backup task is being executed in the current cluster, you cannot update
access_idoraccess_keyfor OSS configured in thebackup_backup_destparameter.
Feature usage recommendations
After updating
access_idandaccess_keyin the backup destination, do not immediately disable the old ones. You can set the expiration time to one hour after the update for the oldaccess_idandaccess_keyto avoid interrupting any backup and restore services that are using the oldaccess_idandaccess_key, such as an ongoing backup clearing task.Do not use the backup verification feature if
access_idandaccess_keyare updated while the old ones are disabled.
Update procedure
Log on to the
systenant as therootuser.Execute the following statement to update
access_idandaccess_keyin the backup destination.obclient> ALTER SYSTEM CHANGE EXTERNAL_STORAGE_DEST PATH='backup_path' SET ACCESS_INFO='access_id=your_access_id&access_key=your_access_key';PATH: information that uniquely identifies a destination, including the backup path and endpoint information.Currently,
PATHsupports only OSS in a format similar tooss://xxx?host=xxx. If thePATHparameter contains other information, an error is returned.The value of the
PATHparameter cannot contain the&symbol. If the backup path of the destination contains a&symbol, you cannot use this method to updateaccess_idoraccess_keyin the backup destination.ACCESS_INFO: the new values ofaccess_idandaccess_key. Currently, onlyaccess_idandaccess_keyvalues are allowed. In addition,access_idandaccess_keycan only be set in pairs.
Here is an example:
obclient> ALTER SYSTEM CHANGE external_storage_dest PATH='oss://oceanbase-test-bucket/backup/?host=xxx.aliyun-inc.com' SET ACCESS_INFO='access_id=******&access_key=******';