After you enable the log archive mode, you can change the archive destination as needed.
Limitations and considerations
When you use AWS S3 or an object storage service compatible with the S3 protocol as the archive medium, the archive lag target (controlled by the
archive_lag_targetparameter) must be greater than or equal to 60 seconds. If you change the archive medium from OSS/NFS to S3 or an object storage service compatible with the S3 protocol and the value of thearchive_lag_targetparameter is less than 60 seconds, an error is returned when you execute the command to change the archive destination.Automatic cleanup only supports cleaning up backup and archive data under the paths specified in the
DATA_BACKUP_DESTandLOG_ARCHIVE_DESTparameters. After you change the archive destination, you can only manually clean up data under the original archive path. For the specific operations for manual cleanup, see Manually clean up specified backup or archive data and Clear the backup path or archive path.
Procedure
Log in to the
systenant or user tenant of the cluster as the tenant administrator.Disable the archive mode. For more information, see Disable the archive mode.
Reconfigure the archive destination.
When you replace the archive destination, if the new directory is an archive directory that the tenant has used before, the
formatfile must exist in the directory. Otherwise, the new directory must be empty.For more information about how to configure the archive destination, see the Configure the archive destination section in Prepare for log archiving.
After the configuration is completed, query the
LOG_ARCHIVE_DESTcolumn of theCDB_OB_ARCHIVE_DESTview in thesystenant or theLOG_ARCHIVE_DESTcolumn of theDBA_OB_ARCHIVE_DESTview in the user tenant to confirm whether the new archive destination is configured. For more information, see View archive parameters.
What to do next
After you change the archive destination, you need to enable the archive mode again. For more information, see Enable the archive mode.