File: db_archive.html

package info (click to toggle)
db 2%3A2.4.14-2.7.7.1.c
  • links: PTS
  • area: main
  • in suites: potato
  • size: 12,716 kB
  • ctags: 9,382
  • sloc: ansic: 35,556; tcl: 8,564; cpp: 4,890; sh: 2,075; makefile: 1,723; java: 1,632; sed: 419; awk: 153; asm: 41
file content (85 lines) | stat: -rw-r--r-- 3,434 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<! "@(#)db_archive.so	10.9 (Sleepycat) 9/29/98">
<!Copyright 1997, 1998 by Sleepycat Software, Inc.  All rights reserved.>
<html>
<body bgcolor=white>
<head>
<title>Berkeley DB: db_archive</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btr
ee,hash,hashing,transaction,transactions,locking,logging,access method,access me
thods,java,C,C++">
</head>
<h1>db_archive</h1>
<hr size=1 noshade>
<tt>
<h3>
<pre>
db_archive [<b>-alsv</b>] [<b>-h home</b>]
</pre>
</h3>
<h1>Description</h1>
<p>
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.
<p>
The options are as follows:
<dl compact>
<p><dt><b>-a</b><dd>Write all pathnames as absolute pathnames,
instead of relative to the database home directories.
<p><dt><b>-h</b><dd>Specify a home directory for the database.
<p><dt><b>-l</b><dd>Write out the pathnames of all of the database log files,
whether or not they are involved in active transactions.
<p><dt><b>-s</b><dd>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.
<p>
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 <a href="../utility/db_recover.html">db_recover</a> 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.
<p><dt><b>-v</b><dd>Run in verbose mode, listing the checkpoints in the log files as they
are reviewed.
</dl>
<p>
The db_archive utility attaches to one or more of the Berkeley DB shared memory
regions.  In order to avoid region corruption, it should always be given
the chance to detach and exit gracefully.  To cause db_archive to clean up
after itself and exit, send it an interrupt signal (SIGINT).
<p>
The <a href="../api_c/DbLog/archive.html">log_archive</a> function is the underlying function used by the db_archive utility.
See the db_archive utility source code for an example of using <a href="../api_c/DbLog/archive.html">log_archive</a>
in a POSIX 1003.1 environment.
<p>
The db_archive utility exits 0 on success, and >0 if an error occurs.
<p>
<h1>Environment Variables</h1>
<p>
<dl compact>
<p><dt>DB_HOME<dd>
If the <b>-h</b> 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 <a href="../api_c/DbEnv/appinit.html">db_appinit</a>.
</dl>
<p>
<h1>See Also</h1>
db_archive,
<a href="../utility/db_checkpoint.html">db_checkpoint</a>,
<a href="../utility/db_deadlock.html">db_deadlock</a>,
<a href="../utility/db_dump.html">db_dump</a>,
<a href="../utility/db_load.html">db_load</a>,
<a href="../utility/db_recover.html">db_recover</a>,
and
<a href="../utility/db_stat.html">db_stat</a>.
</tt>
</body>
</html>