Manual Pages for Linux CentOS command on man db_archive
MyWebUniversity

Manual Pages for Linux CentOS command on man db_archive

DBARCHIVE(1) BerkeleyDB Utilities DBARCHIVE(1)

NAME

dbarchive - Find unused log files for archival SYNOPSIS

dbarchive [-adlsVv] [-h home] [-P password] DESCRIPTION The dbarchive 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 cata‐ strophic failure (which also requires a snapshot of the database files), but they may then be deleted from the system to reclaim disk space. OPTIONS

-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 cata‐ strophic recovery impossible.

-h home 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 password 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 argu‐ ments.

-s 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, dbarchive 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 system. In this case, dbar‐ chive will ignore them. When dbrecover 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.

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

-v Run in verbose mode.

Log cursor handles (returned by the DBENV->logcursor method) may have open file descriptors for log files in the database environment. Also, the Berkeley DB interfaces to the database environment logging subsys‐

tem (for example, DBENV->logput and DBTXN->abort) may allocate log cursors and have open file descriptors for log files as well. On oper‐ ating 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 dbarchive 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 other‐ wise 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 dbarchive utility uses a Berkeley DB environment (as described for

the -h option, the environment variable DBHOME, 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, dbarchive should always be given the chance to detach from the envi‐ ronment and exit gracefully. To cause dbarchive to release all envi‐ ronment resources and exit cleanly, send it an interrupt signal (SIG‐ INT).

The DBENV->logarchive method is the underlying method used by the dbarchive utility. See the dbarchive utility source code for an

example of using DBENV->logarchive in a IEEE/ANSI Std 1003.1 (POSIX) environment. EXIT STATUS The dbarchive utility exits 0 on success, and >0 if an error occurs. ENVIRONMENT DBHOME

If the -h option is not specified and the environment variable DBHOME is set, it is used as the path of the database home, as

described in DBENV->open. NOTES If the application(s) that use the environment make use of any of the following methods:

DBENV->adddatadir

DBENV->setdatadir

DBENV->setlgdir then in order for this utility to run correctly, you need a DBCONFIG file which sets the proper paths using the adddatadir, or setlgdir configuration parameters. SEE ALSO dbcheckpoint(1) dbdeadlock(1) dbdump(1) dbhotbackup(1) dblogver‐ ify(1) dbload(1) dbprintlog(1) dbrecover(1) dbreplicate(1) dbstat(1) dbtuner(1) dbupgrade(1) dbverify(1) BerkeleyDB 5.3.21 06 December 2016 DBARCHIVE(1)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™