After enabling log archiving, you can change the archive destination based on your business requirements.
Limitations and considerations
When using AWS S3 or other object storage compatible with the S3 protocol as the archive medium, the archive lag time (controlled by the
archive_lag_targetparameter) must be greater than or equal to 60 seconds. If the value of thearchive_lag_targetparameter is less than 60 seconds when changing the archive medium from OSS or NFS to S3 or another S3-compatible object storage, the command to change the archive destination will report an error.Since automatic cleanup currently only supports clearing data from backup and archive destinations set in
DATA_BACKUP_DESTandLOG_ARCHIVE_DEST, if you need to change the archive destination, the data under the original archive path cannot be automatically cleaned up by OceanBase Database after the change.
Procedure
Log in to the
systenant or user tenant of the cluster as a tenant administrator.Disable archiving. For detailed operations, see Disable archiving.
Reconfigure the archive destination.
When reconfiguring the archive destination, if the directory to be replaced is an archive directory previously used by the tenant, the
formatfile in that directory must exist. Otherwise, the directory to be replaced must be empty.For detailed operations on configuring the archive destination, see the Configure archive destination section in Prepare for log archiving.
After completion, query the
CDB_OB_ARCHIVE_DESTview (in thesystenant) or theDBA_OB_ARCHIVE_DESTview (in a user tenant) to confirm whether the new archive destination is configured successfully. For detailed operations, see View archive parameters.
What to do next
After the archive destination is successfully changed, you need to enable archiving again. For detailed operations on enabling archiving, see Enable archiving.
