1<!--$Id: db_checkpoint.so,v 10.28 2006/10/05 01:06:08 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB: db_checkpoint</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<table width="100%"><tr valign=top> 12<td> 13<b>db_checkpoint</b> 14</td> 15</tr></table> 16<hr size=1 noshade> 17<tt> 18<b><pre>db_checkpoint [<b>-1Vv</b>] [<b>-h home</b>] 19 [<b>-k kbytes</b>] [<b>-L file</b>] [<b>-P password</b>] [<b>-p min</b>]</pre></b> 20<b>Description</b> 21<a name="2"><!--meow--></a> 22<p>The db_checkpoint utility is a daemon process that monitors the 23database log, and periodically calls <a href="../api_c/txn_checkpoint.html">DB_ENV->txn_checkpoint</a> to checkpoint 24it.</p> 25<p>The options are as follows:</p> 26<br> 27<b>-1</b><ul compact><li>Force a single checkpoint of the log (regardless of whether or not there 28has been activity since the last checkpoint), and then exit. 29<p> 30When the <b>-1</b> flag is specified, the db_checkpoint 31utility will checkpoint the log even if unable to find an existing 32database environment. This functionality is useful when upgrading 33database environments from one version of Berkeley DB to another.</p></ul> 34<b>-h</b><ul compact><li>Specify a home directory for the database environment; by 35default, the current working directory is used.</ul> 36<b>-k</b><ul compact><li>Checkpoint the database at least as often as every <b>kbytes</b> of log 37file are written.</ul> 38<b>-L</b><ul compact><li>Log the execution of the db_checkpoint utility to the specified file in the 39following format, where <i>###</i> is the process ID, and the date 40is the time the utility was started. 41<blockquote><pre>db_checkpoint: ### Wed Jun 15 01:23:45 EDT 1995</pre></blockquote> 42This file will be removed if the db_checkpoint utility exits gracefully.</ul> 43<b>-P</b><ul compact><li>Specify an environment password. Although Berkeley DB utilities overwrite 44password strings as soon as possible, be aware there may be a window of 45vulnerability on systems where unprivileged users can see command-line 46arguments or where utilities are not able to overwrite the memory 47containing the command-line arguments.</ul> 48<b>-p</b><ul compact><li>Checkpoint the database at least every <b>min</b> minutes if there has 49been any activity since the last checkpoint.</ul> 50<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul> 51<b>-v</b><ul compact><li>Write the time of each checkpoint attempt to the standard output.</ul> 52<br> 53<p>At least one of the <b>-1</b>, <b>-k</b>, and <b>-p</b> options 54must be specified.</p> 55<p>The db_checkpoint utility uses a Berkeley DB environment (as described for the 56<b>-h</b> option, the environment variable <b>DB_HOME</b>, or 57because the utility was run in a directory containing a Berkeley DB 58environment). In order to avoid environment corruption when using a 59Berkeley DB environment, db_checkpoint should always be given the chance to 60detach from the environment and exit gracefully. To cause db_checkpoint 61to release all environment resources and exit cleanly, send it an 62interrupt signal (SIGINT).</p> 63<p>The db_checkpoint utility does not attempt to create the Berkeley DB 64shared memory regions if they do not already exist. The application 65that creates the region should be started first, and once the region is 66created, the db_checkpoint utility should be started.</p> 67<p>The <a href="../api_c/txn_checkpoint.html">DB_ENV->txn_checkpoint</a> method is the underlying method used by the db_checkpoint utility. 68See the db_checkpoint utility source code for an example of using <a href="../api_c/txn_checkpoint.html">DB_ENV->txn_checkpoint</a> 69in a IEEE/ANSI Std 1003.1 (POSIX) environment.</p> 70<p>The db_checkpoint utility exits 0 on success, and >0 if an error occurs.</p> 71<br><b>Environment Variables</b> 72<br> 73<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable 74DB_HOME is set, it is used as the path of the database home, as described 75in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul> 76<br> 77</tt> 78<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 79</body> 80</html> 81