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 only supports clearing backup and archive data under the currently specified paths in
DATA_BACKUP_DESTandLOG_ARCHIVE_DEST, after changing the archive destination, the data in the original archive path can only be cleaned up manually.
Procedure
Log in to the
systenant or user tenant of the cluster as a tenant administrator.Disable log archiving. For detailed operations, see Disable log 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 completing the above steps, query the
CDB_OB_ARCHIVE_DESTview (for thesystenant) or theDBA_OB_ARCHIVE_DESTview (for user tenants) to confirm whether the new archive destination has been successfully configured. For detailed operations, see View archive parameters.
What to do next
After successfully changing the archive destination, you need to enable log archiving again. For detailed operations on enabling log archiving, see Enable log archiving.
