# db_archive |

`

###

    db_archive [-alsVv] [-h home]

# Description

The db_archive utility writes the pathnames of log files that are no longer in use (e.g., no longer involved in active transactions), to the standard output, one pathname per line. These log files should be written to backup media to provide for recovery in the case of catastrophic failure (which also requires a snapshot of the database files), but they may then be deleted from the system to reclaim disk space.

The options are as follows:

-a
  Write all pathnames as absolute pathnames, instead of relative to the database home directories.

-h
  Specify a home directory for the database environment; by default, the current working directory is used.

-l
  Write out the pathnames of all of the database log files, whether or not they are involved in active transactions.

-s
  Write the pathnames of all of the database files that need to be archived in order to recover the database from catastrophic failure. If any of the database files have not been accessed during the lifetime of the current log files, db_archive will not include them in this output.

  It is possible that some of the files referenced in the log have since been deleted from the system. In this case, db_archive will ignore them. When db_recover is run, any files referenced in the log that are not present during recovery are assumed to have been deleted and will not be recovered.

-V
  Write the version number to the standard output and exit.

-v
  Run in verbose mode, listing the checkpoints in the log files as they are reviewed.

The db_archive utility uses a Berkeley DB environment (as described for the -h option, the environment variable DB_HOME, or, because the utility was run in a directory containing a Berkeley DB environment). In order to avoid environment corruption when using a Berkeley DB environment, db_archive should always be given the chance to detach from the environment and exit gracefully. To cause db_archive to release all environment resources and exit cleanly, send it an interrupt signal (SIGINT).

The db_archive utility exits 0 on success, and >0 if an error occurs.

# Environment Variables

DB_HOME
  If the -h option is not specified and the environment variable DB_HOME is set, it is used as the path of the database home, as described in DBENV->open.

# See Also

berkeley_db_svc, db_archive, db_checkpoint, db_deadlock, db_dump, db_load, db_recover, db_stat, db_upgrade, and db_verify.`

Copyright Sleepycat Software