---
name: "db4.4_hotbackup"
section: "1"
platform: "linux"
package: "db4.4-util"
version: "4.4.20-8"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/db4.4_hotbackup"
---

# db4.4\_hotbackup(1)

Create "hot backup" or "hot failover" snapshots

## NAME

db4.4\_hotbackup - Create "hot backup" or "hot failover" snapshots

## SYNOPSIS

**db4.4\_hotbackup** \[-cuVv\] \[-d data\_dir ...\] \[-h home\] \[-l log\_dir\] \[-P password\] -b backup\_dir

## DESCRIPTION

The db4.4\_hotbackup utility creates "hot backup" or "hot failover" snapshots of Berkeley DB database environments.

The db4.4\_hotbackup utility performs the following steps:

- 1\.

  If the -c option is specified, checkpoint the source home database environment, and remove any unnecessary log files.

- 2\.

  If the target directory for the backup does not exist, it is created with mode read-write-execute for the owner.

  If the target directory for the backup does exist and the -u option was specified, all log files in the target directory are removed; if the -u option was not specified, all files in the target directory are removed.

- 3\.

  If the -u option was not specified, copy application-specific files found in the database environment home directory, or any directory specified using the -d option, into the target directory for the backup.

- 4\.

  Copy all log files found in the directory specified by the -l option (or in the database environment home directory, if no -l option was specified), into the target directory for the backup.

- 5\.

  Perform catastrophic recovery on the hot backup.

- 6\.

  Remove any unnecessary log files from the hot backup.

The db4.4\_hotbackup utility does not resolve pending transactions that are in the prepared state. Applications that use DB\_TXN-\>prepare should specify DB\_RECOVER\_FATAL when opening the environment, and run DB\_ENV-\>txn\_recover to resolve any pending transactions, when failing over to the hot backup.

## OPTIONS

- **-b**

  Specify the target directory for the backup.

- **-c**

  Before performing the snapshot, checkpoint the source database environment and remove any log files that are no longer required in that environment. **To avoid making catastrophic failure impossible, log file removal** **must be integrated with log file archival.**

- **-d**

  Specify one or more source directories that contain databases; if none is specified, the database environment home directory will be searched for database files.  As database files are copied into a single backup directory, files named the same, stored in different source directories, could overwrite each other when copied into the backup directory.

- **-h**

  Specify the source directory for the backup, that is, the database environment home directory.

- **-l**

  Specify a source directory that contains log files; if none is specified, the database environment home directory will be searched for log files.

- **-P**

  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 arguments.

- **-u**

  Update a pre-existing hot backup snapshot by copying in new log files. If the **-u** option is specified, no databases will be copied into the target directory.

- **-V**

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

- **-v**

  Run in verbose mode, listing operations as they are done.

The db4.4\_hotbackup utility uses a Berkeley DB environment (as described for the **-h** option, the environment variable **DB\_HOME**, 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, db4.4\_hotbackup should always be given the chance to detach from the environment and exit gracefully.  To cause db4.4\_hotbackup to release all environment resources and exit cleanly, send it an interrupt signal (SIGINT).

The db4.4\_hotbackup utility exits 0 on success, and \>0 if an error occurs.

## ENVIRONMENT

- **DB\_HOME**

  If the **-h** 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 DB\_ENV-\>open.

## AUTHORS

Sleepycat Software, Inc. This manual page was created based on the HTML documentation for db\_hotbackup from Sleepycat, by Thijs Kinkhorst \<thijs@kinkhorst.com\>, for the Debian system (but may be used by others).
