1
<!--$Id: db_archive.so,v 10.22 2001/05/05 01:49:36 bostic Exp $-->
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
6
<title>Berkeley DB: db_archive</title>
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
11
<a name="2"><!--meow--></a>
12
<table width="100%"><tr valign=top>
17
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
21
<h3><pre>db_archive [<b>-alsVv</b>] [<b>-h home</b>]</pre></h3>
23
<a name="3"><!--meow--></a>
24
<p>The db_archive utility writes the pathnames of log files that
25
are no longer in use (for example, no longer involved in active
26
transactions), to the standard output, one pathname per line. These
27
log files should be written to backup media to provide for recovery in
28
the case of catastrophic failure (which also requires a snapshot of the
29
database files), but they may then be deleted from the system to reclaim
31
<p>The options are as follows:
33
<p><dt><b>-a</b><dd>Write all pathnames as absolute pathnames, instead of relative to the
34
database home directories.
35
<p><dt><b>-h</b><dd>Specify a home directory for the database environment; by
36
default, the current working directory is used.
37
<p><dt><b>-l</b><dd>Write out the pathnames of all the database log files, whether or not
38
they are involved in active transactions.
39
<p><dt><b>-s</b><dd>Write the pathnames of all the database files that need to be archived
40
in order to recover the database from catastrophic failure. If any of
41
the database files have not been accessed during the lifetime of the
42
current log files, db_archive will not include them in this
44
<p>It is possible that some of the files to which the log refers have since
45
been deleted from the system. In this case, db_archive will
46
ignore them. When <a href="../utility/db_recover.html">db_recover</a> is run, any files to which the
47
log refers that are not present during recovery are assumed to have been
48
deleted and will not be recovered.
49
<p><dt><b>-V</b><dd>Write the library version number to the standard output, and exit.
50
<p><dt><b>-v</b><dd>Run in verbose mode, listing the checkpoints in the log files as they
53
<p>The db_archive utility uses a Berkeley DB environment (as described for the
54
<b>-h</b> option, the environment variable <b>DB_HOME</b>, or
55
because the utility was run in a directory containing a Berkeley DB
56
environment). In order to avoid environment corruption when using a
57
Berkeley DB environment, db_archive should always be given the chance to
58
detach from the environment and exit gracefully. To cause db_archive
59
to release all environment resources and exit cleanly, send it an
60
interrupt signal (SIGINT).
61
<p>The db_archive utility exits 0 on success, and >0 if an error occurs.
62
<h1>Environment Variables</h1>
64
<p><dt>DB_HOME<dd>If the <b>-h</b> option is not specified and the environment variable
65
DB_HOME is set, it is used as the path of the database home, as described
66
in <a href="../api_c/env_open.html">DB_ENV->open</a>.
69
<a href="../utility/berkeley_db_svc.html">berkeley_db_svc</a>,
71
<a href="../utility/db_checkpoint.html">db_checkpoint</a>,
72
<a href="../utility/db_deadlock.html">db_deadlock</a>,
73
<a href="../utility/db_dump.html">db_dump</a>,
74
<a href="../utility/db_load.html">db_load</a>,
75
<a href="../utility/db_recover.html">db_recover</a>,
76
<a href="../utility/db_stat.html">db_stat</a>,
77
<a href="../utility/db_upgrade.html">db_upgrade</a>,
79
<a href="../utility/db_verify.html">db_verify</a>.
81
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>