DB5.3_HOTBACKUP(1)
β¨ db5.3_hotbackup β¨
okay bestie, so like β this is the manual page for db5.3_hotbackup, a General Commands Manual entry. it makes "hot backup" / "hot failover" snapshots of Berkeley DB environments, and it is lowkey iconic for it π
π NAME π
db5.3_hotbackup β Create "hot backup" or "hot failover" snapshots π
πΈ SYNOPSIS πΈ
db5.3_hotbackup [-cDuVv] [-d data_dir ...] [-h home] [-l log_dir] [-P
password] -b backup_dir
π¦ DESCRIPTION π¦
The db5.3_hotbackup utility creates "hot backup" or "hot failover" snapshots of Berkeley DB database environments. no cap, that's literally the whole job description π«Ά
The db5.3_hotbackup utility performs the following steps:
- If the
-coption is specified, checkpoint the source home database environment, and remove any unnecessary log files. - 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.
- If the
-uoption was not specified, copy application-specific files found in the database environment home directory, or any directory specified using the-doption, into the target directory for the backup. - Copy all log files found in the directory specified by the
-loption (or in the database environment home directory, if no-loption was specified), into the target directory for the backup. - Perform catastrophic recovery on the hot backup. π yes the word is catastrophic, it's fine, it's a whole thing.
- Remove any unnecessary log files from the hot backup.
The db5.3_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. that's the whole tea, don't skip it π₯
π OPTIONS π
-bβ Specify the target directory for the backup. this one is not optional bestie, it's required, periodt.-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. π¨ like, actually read that part twice.-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. π name collision jumpscare.-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. π so like, be careful out there.-uβ Update a pre-existing hot backup snapshot by copying in new log files. If the-uoption 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. π£οΈ she narrates her own work, we love a transparent queen.-Dβ Use the data directories listed in theDB_CONFIGconfiguration file in the source directory. This option has three effects: First, if they do not already exist, the specified data directories will be created relative to the target directory (with mode read-write-execute owner). Second, all files in the source data directories will be copied to the target data directories. If theDB_CONFIGfile specifies one or more absolute pathnames, files in those source directories will be copied to the top-level target directory. Third, theDB_CONFIGconfiguration file will be copied from the source directory to the target directory, and subsequently used for configuration if recovery is run in the target directory.
Care should be taken with the-Doption and data directories which are named relative to the source directory but are not subdirectories (that is, the name includes the element".."). Specifically, the constructed target directory names must be meaningful and distinct from the source directory names, otherwise running recovery in the target directory might corrupt the source data files. π no fr fr, this is the scary one.
It is an error to use absolute pathnames for data directories or the log directory in this mode, as the DB_CONFIG configuration file copied into the target directory would then point at the source directories and running recovery would corrupt the source data files. β οΈ not a vibe. do not do it.
The db5.3_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, db5.3_hotbackup should always be given the chance to detach from the environment and exit gracefully. To cause db5.3_hotbackup to release all environment resources and exit cleanly, send it an interrupt signal (SIGINT). β¨ graceful exits only, we do not ghost our environments here.
The db5.3_hotbackup utility exits 0 on success, and >0 if an error occurs. π
π ENVIRONMENT π
DB_HOMEβ If the-hoption is not specified and the environment variableDB_HOMEis set, it is used as the path of the database home, as described inDB_ENV->open.
π AUTHORS π
Oracle Corporation. 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).
and that's the whole page bestie!! π this one's from the DB5.3_HOTBACKUP(1) manual, dated 28 January 2005, and it ate, honestly. go make some hot backups, hydrate, and remember: always let her exit gracefully. ππ¦β¨
π¦ where this page comes from
- debian bookworm: db5.3-util 5.3.28+dfsg2-1
- debian trixie: db5.3-util 5.3.28+dfsg2-9
- ubuntu jammy: db5.3-util 5.3.28+dfsg1-0.8ubuntu3
- ubuntu noble: db5.3-util 5.3.28+dfsg2-7
- ubuntu questing: db5.3-util 5.3.28+dfsg2-9ubuntu1
- ubuntu resolute: db5.3-util 5.3.28+dfsg2-10ubuntu1
- ubuntu stonking: db5.3-util 5.3.28+dfsg2-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms