85 lines
3.1 KiB
Plaintext
85 lines
3.1 KiB
Plaintext
m4_comment([$Id: db_archive.so,v 10.30 2006/10/05 01:06:08 bostic Exp $])
|
|
|
|
include(m4/m4.utility)
|
|
define(M4PAGELOCAL, db_archive)
|
|
|
|
m4_util_header(db_archive, [db_archive m4_utilarg(adlsVv) m4_utilarg([h home]) m4_utilarg([P password])])
|
|
m4_idefz(utility to @archive log files)
|
|
|
|
m4_p([dnl
|
|
The m4_ref(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.])
|
|
|
|
m4_p([The options are as follows:])
|
|
|
|
m4_tagbegin
|
|
m4_tagopt(a, [dnl
|
|
Write all pathnames as absolute pathnames, instead of relative to the
|
|
database home directories.])
|
|
|
|
m4_tagopt(d, [dnl
|
|
Remove log files that are no longer needed; no filenames are written.
|
|
Automatic log file removal is likely to make catastrophic recovery
|
|
impossible.])
|
|
|
|
m4_hflag
|
|
|
|
m4_tagopt(l, [dnl
|
|
Write out the pathnames of all the database log files, whether or not
|
|
they are involved in active transactions.])
|
|
|
|
m4_Pflag
|
|
|
|
m4_tagopt(s, [dnl
|
|
Write the pathnames of all 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, m4_ref(db_archive) will not include them in this
|
|
output.
|
|
m4_p([dnl
|
|
It is possible that some of the files to which the log refers have since
|
|
been deleted from the system. In this case, m4_ref(db_archive) will
|
|
ignore them. When m4_ref(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 recovered.])])
|
|
|
|
m4_Vflag
|
|
|
|
m4_tagopt(v, [dnl
|
|
Run in verbose mode.])
|
|
m4_tagend
|
|
|
|
m4_p([dnl
|
|
Log cursor handles (returned by the m4_refT(log_cursor)) may have open
|
|
file descriptors for log files in the database environment. Also, the
|
|
m4_db interfaces to the database environment logging subsystem (for
|
|
example, m4_ref(log_put) and m4_ref(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 m4_ref(db_archive) may fail. All m4_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.)])
|
|
|
|
m4_detach(db_archive, uses)
|
|
|
|
m4_underfunc(log_archive, log_archive, db_archive)
|
|
|
|
m4_utilexit(db_archive)
|
|
|
|
m4_header([Environment Variables])
|
|
|
|
m4_utilenv(db_archive)
|
|
|
|
m4_page_footer
|