After you enable log archiving, you can change the log archive destination based on your business needs.
Limitations and considerations
If you use Amazon Simple Storage Service (S3) or an object storage service that is compatible with the S3 protocol as the archive destination type, the lag of log archiving, which is specified by the
archive_lag_targetparameter, must be greater than or equal to 60 seconds. If you change the archive destination type from Alibaba Cloud Object Storage Service (OSS) or Network File System (NFS) to S3 or an object storage service compatible with the S3 protocol, but the current value of thearchive_lag_targetparameter is smaller than 60 seconds, an error is returned after you execute the statement that changes the archive destination.Automatic cleanup only supports cleaning up the backup and archive data in the paths currently specified by
DATA_BACKUP_DESTandLOG_ARCHIVE_DEST. After you change the archive destination, the data in the original archive path can only be cleaned up manually. For more information about manually cleaning up backup data, see Manually clean up specified backup or archive data and Manually clear the backup path or archive path.
Procedure
Log in to the
systenant or a user tenant as the administrator.Disable log archiving. For more information, see Disable ARCHIVELOG.
Reconfigure the log archive destination.
When you reconfigure the archive destination, if the destination directory is an archive directory that has been used by the tenant before, the
formatfile in the directory must exist. Otherwise, the destination directory must be empty.For more information about how to configure the archive destination, see the Configure the destination for archiving logs section in Prepare for log archiving.
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 archive destination is successfully configured. For more information, see View the archiving parameter settings.
What to do next
After you change the archive destination, you must enable log archiving again. For more information, see Enable ARCHIVELOG.
