After you enable log archiving, you can change the log archive destination based on your business needs.
Limitations
When using AWS S3 or another object storage service that supports the S3 protocol as the archiving medium, the archive lag time (controlled by the
archive_lag_targetparameter) must be 60 seconds or longer. If the value ofarchive_lag_targetis less than 60 seconds when switching the archiving medium from OSS or NFS to S3 or another object storage service that supports the S3 protocol, an attempt to execute the command to modify the archiving destination will lead to an error.The automatic cleanup feature applies only to the backup destinations specified in
DATA_BACKUP_DESTand the log archive destinations specified inLOG_ARCHIVE_DEST. Therefore, if you need to change the log archive destination, the data in the original archive path cannot be automatically cleaned up by OceanBase Database.
Procedure
Log on to the
systenant or a user tenant as the administrator.Disable log archiving. For more information, see Disable ARCHIVELOG.
Reconfigure the log archive destination.
Make sure that the directory where the new log archive destination belongs is empty. For more information about how to configure the log archive destination, see the Configure the archive destination section in Preparations.
Query the
CDB_OB_ARCHIVE_DESTview in thesystenant or theDBA_OB_ARCHIVE_DESTview in a user tenant for theLOG_ARCHIVE_DESTcolumn to verify whether the new log archive destination is successfully configured. For more information, see View the archiving parameter settings.
What to do next
After you change the log archive destination, you must enable log archiving again. For more information, see Enable ARCHIVELOG.