Removing Log Files

By default BDB XML does not delete log files for you. For this reason, BDB XML's log files will eventually grow to consume an unnecessarily large amount of disk space. To guard against this, you should periodically take administrative action to remove log files that are no longer in use by your application.

You can remove a log file if all of the following are true:

BDB XML provides several mechanisms to remove log files that meet all but the last criteria (BDB XML has no way to know which log files have already been included in a backup). The following mechanisms make it easy to remove unneeded log files, but can result in an unusable backup if the log files are not first saved to your archive location. All of the following mechanisms automatically delete unneeded log files for you:

In order to safely remove log files and still be able to perform catastrophic recovery, use the db_archive command line utility as follows:

  1. Run either a normal or hot backup as described in Backup Procedures. Make sure that all of this data is safely stored to your backup media before continuing.

  2. If you have not already done so, perform a checkpoint. See Checkpoints for more information.

  3. If you are maintaining a hot backup, perform the hot backup procedure as described in Using Hot Failovers.

  4. Run the db_archive command line utility with the -d option against your production environment.

  5. Run the db_archive command line utility with the -d option against your failover environment, if you are maintaining one.