This manual page is for Mac OS X Server version 10.6

If you are running Mac OS X (client), this command is not available.

If you are running a different version of Mac OS X Server, view the documentation locally:

  • In Xcode

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



db_archive(1)                            BSD General Commands Manual                           db_archive(1)

NAME
     db_archive

SYNOPSIS
     db_archive [-adlsVv] [-h home] [-P password]

DESCRIPTION
     The db_archive utility writes the pathnames of log files that are no longer in use (for example, 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.

     -d
        Remove log files that are no longer needed; no filenames are written. Automatic log file removal is
        likely to make catastrophic recovery impossible.

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

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

     -P
        Specify an environment password. Although Berkeley DB utilities overwrite password strings as soon
        as possible, be aware there may be a window of vulnerability on systems where unprivileged users can
        see command-line arguments or where utilities are not able to overwrite the memory containing the
        command-line arguments.

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

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

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

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

     Log cursor handles (returned by the DB_ENV->log_cursor method) may have open file descriptors for log
     files in the database environment. Also, the Berkeley DB interfaces to the database environment logging
     subsystem (for example, DB_ENV->log_put and DB_TXN->abort) may allocate log cursors and have open file
     descriptors for log files as well. On operating systems where filesystem related system calls (for
     example, rename and unlink on Windows/NT) can fail if a process has an open file descriptor for the
     affected file, attempting to move or remove the log files listed by db_archive may fail. All Berkeley
     DB internal use of log cursors operates on active log files only and furthermore, is short-lived in
     nature. So, an application seeing such a failure should be restructured to close any open log cursors
     it may have, and otherwise to retry the operation until it succeeds. (Although the latter is not likely
     to be necessary; it is hard to imagine a reason to move or rename a log file in which transactions are
     being logged or aborted.)

     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_ENV->log_archive method is the underlying method used by the db_archive utility. See the db_ar-chive db_archive
     chive utility source code for an example of using DB_ENV->log_archive in a IEEE/ANSI Std 1003.1 (POSIX)
     environment.

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

ENVIRONMENT
     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 DB_ENV->open.

SEE ALSO
     db_checkpoint(1), db_deadlock(1), db_dump(1), db_load(1), db_printlog(1), db_recover(1), db_stat(1),
     db_upgrade(1), db_verify(1)

Darwin                                        December 3, 2003                                        Darwin

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.