'\" t .\" Man page generated from reStructuredText .\" by the Docutils 0.22.4 manpage writer. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "BARMAN" "1" "Sep 29, 2026" "3.20" "Barman" .SH NAME barman \- Barman Commands .sp Barman has a command\-line interface named \fBbarman\fP, which is used basically to interact with Barman\(aqs backend. .sp Before jumping into each of the sub\-commands of \fBbarman\fP, be aware that \fBbarman\fP has global options available for all of the sub\-commands. These options can modify the behavior of the sub\-commands and can be used as follows: .SH BARMAN .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX barman [ { \-c | \-\-config } CONFIG ] [ { \-\-color | \-\-colour } { never | always | auto } ] [ { \-d | \-\-debug } ] [ { \-f | \-\-format } { json | console } ] [ { \-h | \-\-help } ] [ \-\-log\-level { NOTSET | DEBUG | INFO | WARNING | ERROR | CRITICAL } ] [ { \-q | \-\-quiet } ] [ { \-v | \-\-version } ] [ SUBCOMMAND ] .EE .UNINDENT .UNINDENT .sp \fBNote:\fP .INDENT 0.0 .INDENT 3.5 This is the syntax for the synopsis: .INDENT 0.0 .IP \(bu 2 Options between square brackets are optional. .IP \(bu 2 Options between curly brackets represent a choose one of set operation. .IP \(bu 2 Options with \fB[ ... ]\fP can be specified multiple times. .IP \(bu 2 Things written in uppercase represent a literal that should be given a value to. .UNINDENT .sp We will use this same syntax when describing \fBbarman\fP sub\-commands in the following sections. .sp Also, when describing sub\-commands in the following sections, the commands\(aq synopsis should be seen as a replacement for the \fBSUBCOMMAND\fP\&. .UNINDENT .UNINDENT .SS Parameters .INDENT 0.0 .TP .B \fB\-c\fP / \fB\-\-config CONFIG\fP Specify the configuration file to be used. Defaults to \fB/etc/barman.conf\fP if not provided. .TP .B \fB\-\-color\fP / \fB\-\-colour { never | always | auto }\fP Control whether to use colors in the output. The default is \fBauto\fP\&. Options are: .INDENT 7.0 .IP \(bu 2 \fBnever\fP: Do not use color. .IP \(bu 2 \fBalways\fP: Always use color. .IP \(bu 2 \fBauto\fP: Use color if the output is to a terminal. .UNINDENT .TP .B \fB\-d\fP / \fB\-\-debug\fP Enable debug output. Default is \fBfalse\fP\&. Provides detailed logging information for troubleshooting. .TP .B \fB\-f\fP / \fB\-\-format { json | console }\fP Specify the output format. Options are: .INDENT 7.0 .IP \(bu 2 \fBjson\fP: Output in JSON format. .IP \(bu 2 \fBconsole\fP: Output in human\-readable format (default). .UNINDENT .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-log\-level { NOTSET | DEBUG | INFO | WARNING | ERROR | CRITICAL }\fP Override the default logging level. Options are: .INDENT 7.0 .IP \(bu 2 \fBNOTSET\fP: This is the default level when no specific logging level is set. It essentially means \(dqno filtering\(dq of log messages, allowing all messages to be processed according to the levels that are set in the configuration. .IP \(bu 2 \fBDEBUG\fP: This level is used for detailed, diagnostic information, often useful for developers when diagnosing problems. It includes messages that are more granular and detailed, intended to help trace the execution of the program. .IP \(bu 2 \fBINFO\fP: This level provides general information about the application\(aqs normal operation. It\(aqs used for messages that indicate the progress of the application or highlight key points in the execution flow that are useful but not indicative of any issues. .IP \(bu 2 \fBWARNING\fP: This level indicates that something unexpected happened or that there might be a potential problem. It\(aqs used for messages that are not critical but could be of concern, signaling that attention might be needed. .IP \(bu 2 \fBERROR\fP: This level is used when an error occurs that prevents a particular operation from completing successfully. It\(aqs used to indicate significant issues that need to be addressed but do not necessarily stop the application from running. .IP \(bu 2 \fBCRITICAL\fP: This is the highest level of severity, indicating a serious error that has likely caused the application to terminate or will have severe consequences if not addressed immediately. It\(aqs used for critical issues that demand urgent attention. .UNINDENT .TP .B \fB\-q\fP / \fB\-\-quiet\fP Suppress all output. Useful for cron jobs or automated scripts. .TP .B \fB\-v\fP / \fB\-\-version\fP Show the program version number and exit. .UNINDENT .SH SHORTCUTS .sp For some commands, you can use the following shortcuts or aliases to identify a backup for a given server. Specifically, the \fBall\fP shortcut can be used to identify all servers: .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBall\fP T} T{ All available servers T} _ T{ \fBfirst/oldest\fP T} T{ Oldest available backup for the server, in chronological order. T} _ T{ \fBlast/latest\fP T} T{ Most recent available backup for the server, in chronological order. T} _ T{ \fBlast\-full/latest\-full\fP T} T{ Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&. T} _ T{ \fBlast\-failed\fP T} T{ Most recent backup that failed, in chronological order. T} .TE .SH EXIT STATUSES .sp Status code \fB0\fP means \fBsuccess\fP, while status code \fBNon\-Zero\fP means \fBfailure\fP\&. .SH SUB-COMMANDS .sp \fBbarman\fP exposes several handy operations. This section is intended to describe each of them. .sp In the following sections you can find a description of each command implemented by \fBbarman\fP\&. Some of these commands may have more detailed information in another main section in this documentation. If that is the case, a reference is provided to help you quickly navigate to it. .SS \fBbarman archive\-wal\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX archive\-wal [ { \-h | \-\-help } ] SERVER_NAME .EE .UNINDENT .UNINDENT .SS Description .sp Fetch WAL files received from either the standard \fBarchive_command\fP or streaming replication with \fBpg_receivewal\fP and store them in the server\(aqs WAL archive. If you have enabled \fBcompression\fP in the configuration file, the WAL files will be compressed before they are archived. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS \fBbarman backup\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX backup [ \-\-bwlimit KBPS ] [ \-\-cloud\-staging\-directory PATH ] [ \-\-cloud\-staging\-max\-size SIZE ] [ { \-h | \-\-help } ] [ \-\-incremental BACKUP_ID ] [ \-\-immediate\-checkpoint ] [ { \-j | \-\-jobs } PARALLEL_WORKERS ] [ \-\-jobs\-start\-batch\-period PERIOD ] [ \-\-jobs\-start\-batch\-size SIZE ] [ \-\-keepalive\-interval SECONDS ] [ \-\-manifest ] [ \-\-name NAME ] [ \-\-no\-immediate\-checkpoint ] [ \-\-no\-manifest ] [ \-\-no\-retry ] [ \-\-retry\-sleep SECONDS ] [ \-\-retry\-times NUMBER ] [ \-\-reuse\-backup { off | copy | link } ] [ { \-\-wait | \-w } ] [ \-\-wait\-timeout SECONDS ] SERVER_NAME [ SERVER_NAME ... ] .EE .UNINDENT .UNINDENT .SS Description .sp Execute a PostreSQL server backup. Barman will use the parameters specified in the Global and Server configuration files. Specify \fBall\fP shortcut instead of the server name to execute backups from all servers configured in the Barman node. You can also specify multiple server names in sequence to execute backups for specific servers. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node. .TP .B \fB\-\-bwlimit\fP Specify the maximum transfer rate in kilobytes per second. A value of 0 indicates no limit. This setting overrides the \fBbandwidth_limit\fP configuration option. .TP .B \fB\-\-cloud\-staging\-directory\fP A staging directory for when sending backups to a cloud object storage using \fBbackup_method = postgres\fP\&. It is used as a temporary location for storing chunks of the backup before they are sent to the cloud. Defaults to \fB/tmp/barman/cloud\-staging\fP\&. .TP .B \fB\-\-cloud\-staging\-max\-size\fP The maximum size that \fB\-\-cloud\-staging\-directory\fP can grow to before Barman stops generating new backup chunks. This is used to prevent the staging directory from growing in case the speed of uploading chunks does not keep up with the speed of streaming them from Postgres. The default value is \fB30Gi\fP\&. .sp Extremely low values are discouraged as they may lead to performance degradation. We recommend a minimum of at least \fB10Gi\fP\&. The optimal value will depend on the transfer speed of the backup to Barman and from Barman to the cloud, as well as the size of the backup. .sp The accepted format is \fBn{k|Ki|M|Mi|G|Gi|T|Ti}\fP and case\-sensitive, where \fBn\fP is an integer greater than zero, with an optional SI or IEC suffix. k stands for kilo with k = 1000, while Ki stands for kilobytes Ki = 1024. The rest of the options have the same reasoning for greater units of measure. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-incremental\fP Execute a block\-level incremental backup. You must provide a \fBBACKUP_ID\fP or a shortcut to a previous backup, which will serve as the parent backup for the incremental backup. .sp \fBNote:\fP .INDENT 7.0 .INDENT 3.5 The backup to be and the parent backup must have \fBbackup_method=postgres\fP\&. .UNINDENT .UNINDENT .TP .B \fB\-\-immediate\-checkpoint\fP Forces the initial checkpoint to be executed as soon as possible, overriding any value set for the \fBimmediate_checkpoint\fP parameter in the configuration file. .TP .B \fB\-j\fP / \fB\-\-jobs\fP Specify the number of parallel workers to use for copying files during the backup. This setting overrides the \fBparallel_jobs\fP parameter if it\(aqs specified in the configuration file. .TP .B \fB\-\-jobs\-start\-batch\-period\fP Specify the time period, in seconds, for starting a single batch of jobs. This value overrides the \fBparallel_jobs_start_batch_period\fP parameter if it is set in the configuration file. The default is \fB1\fP second. .TP .B \fB\-\-jobs\-start\-batch\-size\fP Specify the maximum number of parallel workers to initiate in a single batch. This value overrides the \fBparallel_jobs_start_batch_size\fP parameter if it is defined in the configuration file. The default is \fB10\fP workers. .TP .B \fB\-\-keepalive\-interval\fP Specify an interval, in seconds, for sending a heartbeat query to the server to keep the libpq connection active during a Rsync backup. The default is \fB60\fP seconds. A value of \fB0\fP disables the heartbeat. .TP .B \fB\-\-manifest\fP Forces the creation of a backup manifest file upon completing a backup. Overrides the \fBautogenerate_manifest\fP parameter from the configuration file. Applicable only to rsync backup strategy. .TP .B \fB\-\-name\fP Specify a friendly name for this backup which can be used in place of the backup ID in barman commands. .TP .B \fB\-\-no\-immediate\-checkpoint\fP Forces the backup to wait for the checkpoint to be executed overriding any value set for the \fBimmediate_checkpoint\fP parameter in the configuration file. .TP .B \fB\-\-no\-manifest\fP Disables the automatic creation of a backup manifest file upon completing a backup. This setting overrides the \fBautogenerate_manifest\fP parameter from the configuration file and applies only to rsync backup strategy. .TP .B \fB\-\-no\-retry\fP There will be no retry in case of an error. It is the same as setting \fB\-\-retry\-times 0\fP\&. .TP .B \fB\-\-retry\-sleep\fP Specify the number of seconds to wait after a failed copy before retrying. This setting applies to both backup and recovery operations and overrides the \fBbasebackup_retry_sleep\fP parameter if it is defined in the configuration file. .TP .B \fB\-\-retry\-times\fP Specify the number of times to retry the base backup copy in case of an error. This applies to both backup and recovery operations and overrides the \fBbasebackup_retry_times\fP parameter if it is set in the configuration file. .TP .B \fB\-\-reuse\-backup\fP Overrides the behavior of the \fBreuse_backup\fP option configured in the configuration file. The possible values are: .INDENT 7.0 .IP \(bu 2 \fBoff\fP: Do not reuse the last available backup. .IP \(bu 2 \fBcopy\fP: Reuse the last available backup for a server and create copies of unchanged files (reduces backup time). .IP \(bu 2 \fBlink\fP (default): Reuse the last available backup for a server and create hard links to unchanged files (saves both backup time and space). .UNINDENT .sp \fBNote:\fP .INDENT 7.0 .INDENT 3.5 This will only have any effect if the last available backup was executed with \fBbackup_method=rsync\fP\&. .UNINDENT .UNINDENT .TP .B \fB\-\-wait\fP / \fB\-w\fP Wait for all necessary WAL files required by the base backup to be archived. .TP .B \fB\-\-wait\-timeout\fP Specify the duration, in seconds, to wait for the required WAL files to be archived before timing out. .UNINDENT .SS Shortcuts .sp Use shortcuts instead of \fBSERVER_NAME\fP\&. .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBall\fP T} T{ All available servers T} .TE .SS \fBbarman check\-archived\-wal\-range\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX check\-archived\-wal\-range [ { \-h | \-\-help } ] SERVER_NAME BEGIN_WAL END_WAL .EE .UNINDENT .UNINDENT .SS Description .sp Check that all WAL segments in the range from \fBBEGIN_WAL\fP to \fBEND_WAL\fP (inclusive) are present in the WAL archive of the specified server. If any segments are missing, they are listed and the command exits with a non\-zero status. Exits with status 0 when the sequence is complete. .sp This command scans the WAL archive directory directly, so it reflects the actual state of the storage rather than Barman\(aqs internal index. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node. .TP .B \fBBEGIN_WAL\fP Name of the first WAL segment in the range to verify (inclusive). .TP .B \fBEND_WAL\fP Name of the last WAL segment in the range to verify (inclusive). .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS \fBbarman check\-backup\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX check\-backup [ { \-h | \-\-help } ] SERVER_NAME BACKUP_ID .EE .UNINDENT .UNINDENT .SS Description .sp Check that all necessary WAL files for verifying the consistency of a physical backup are properly archived. This command is automatically executed by the cron job and at the end of each backup operation. You can use a shortcut instead of \fBBACKUP_ID\fP\&. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node. .TP .B \fBBACKUP_ID\fP Id of the backup in barman catalog. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS Shortcuts .sp Use shortcuts instead of \fBBACKUP_ID\fP\&. .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBfirst/oldest\fP T} T{ Oldest available backup for the server, in chronological order. T} _ T{ \fBlast/latest\fP T} T{ Most recent available backup for the server, in chronological order. T} _ T{ \fBlast\-full/latest\-full\fP T} T{ Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&. T} _ T{ \fBlast\-failed\fP T} T{ Most recent backup that failed, in chronological order. T} .TE .SS \fBbarman check\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX check [ { \-h | \-\-help } ] [ \-\-nagios ] SERVER_NAME [ SERVER_NAME ... ] .EE .UNINDENT .UNINDENT .SS Description .sp Display status information about a server, such as SSH connection, Postgres version, configuration and backup directories, archiving and streaming processes, replication slots, and more. Use \fBall\fP as shortcut to show diagnostic information for all configured servers. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-nagios\fP Nagios plugin compatible output. .UNINDENT .SS Shortcuts .sp Use shortcuts instead of \fBSERVER_NAME\fP\&. .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBall\fP T} T{ All available servers T} .TE .SS \fBbarman cloud\-wal\-archive\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX cloud\-wal\-archive [ { \-h | \-\-help } ] [ { \-p | \-\-parallel } PARALLEL ] SERVER_NAME WAL_PATH .EE .UNINDENT .UNINDENT .SS Description .sp Push a WAL file from the local disk to a configured cloud object storage. This command is intended to be used in the \fBarchive_command\fP of a Postgres server when using the \fBlocal\-to\-cloud\fP backup method for taking base backups. .sp \fBNote:\fP .INDENT 0.0 .INDENT 3.5 The compression algorithm and level used for the WAL files can be configured in the Barman server configuration file. If not specified, the WAL file will be uploaded without compression. .UNINDENT .UNINDENT .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP The name of the Postgres server for which the WAL file is being archived. .TP .B \fBWAL_PATH\fP The value of the \fB%p\fP keyword (according to \fBarchive_command\fP). .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-p\fP / \fB\-\-parallel\fP Number of WALs to archive in parallel. When set to a value greater than \fB1\fP, up to \fBparallel \- 1\fP additional WAL files that are ready in \fBpg_wal/archive_status\fP are uploaded concurrently in background processes after the primary WAL has been successfully archived. This can reduce WAL archival backlog during periods of high WAL generation. Defaults to the \fBcloud_wal_archive_parallel\fP server configuration value, which itself defaults to \fB0\fP (disabled). .UNINDENT .SS \fBbarman cloud\-wal\-restore\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX cloud\-wal\-restore [ { \-h | \-\-help } ] [ { \-p | \-\-parallel } PARALLEL ] [ \-\-spool\-dir SPOOL_DIR ] SERVER_NAME WAL_NAME WAL_DEST .EE .UNINDENT .UNINDENT .SS Description .sp Pull a WAL file from a configured cloud object storage to the local disk. This command is intended to be used as \fBrestore_command\fP in Postgres when restoring WALs from a cloud object storage. .sp This command requires the server to have cloud storage configured via \fBwals_directory\fP pointing to a cloud URL (e.g., \fBs3://barman/wals\fP). .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP The name of the Postgres server for which the WAL file is being restored. .TP .B \fBWAL_NAME\fP The value of the \fB%f\fP keyword (according to \fBrestore_command\fP). .TP .B \fBWAL_DEST\fP The value of the \fB%p\fP keyword (according to \fBrestore_command\fP). .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. .TP .B \fB\-p\fP / \fB\-\-parallel\fP Specifies the number of WAL files to peek and download in parallel. When set to a value greater than \fB1\fP, fetches the requested WAL file along with the next \fBN \- 1\fP files simultaneously. The additional files are staged in the spool directory so that subsequent restore requests can be served immediately from local storage. Default is \fB0\fP (disabled). .TP .B \fB\-\-spool\-dir\fP Directory used for staging extra WALs fetched when using \fB\-\-parallel\fP\&. Default is \fB/var/tmp/walrestore\fP\&. .UNINDENT .sp \fBTip:\fP .INDENT 0.0 .INDENT 3.5 When using \fB\-\-parallel\fP and both the \fBpg_wal\fP directory and the spool directory are on the same filesystem, WAL files are served faster because they are renamed rather than copied. .UNINDENT .UNINDENT .SS \fBbarman config\-switch\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX config\-switch [ { \-h | \-\-help } ] SERVER_NAME { \-\-reset | MODEL_NAME } .EE .UNINDENT .UNINDENT .SS Description .sp Apply a set of configuration overrides from the model to a server in Barman. The final configuration will combine or override the server\(aqs existing settings with the ones specified in the model. You can reset the server configurations with the \fB\-\-reset\fP argument. .sp \fBNote:\fP .INDENT 0.0 .INDENT 3.5 Only one model can be active at a time for a given server. .UNINDENT .UNINDENT .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node. .TP .B \fBMODEL_NAME\fP Name of the model. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-reset\fP Reset the server\(aqs configurations. .UNINDENT .SS \fBbarman config\-update\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX config\-update [ { \-h | \-\-help } ] STRING .EE .UNINDENT .UNINDENT .SS Description .sp Create or update the configurations for servers and/or models in Barman. The parameter should be a JSON string containing an array of documents. Each document must include a \fBscope\fP key, which can be either server or model, and either a \fBserver_name\fP or \fBmodel_name\fP key, depending on the scope value. Additionally, the document should include other keys representing Barman configuration options and their desired values. .sp \fBNote:\fP .INDENT 0.0 .INDENT 3.5 The barman \fBconfig\-update\fP command writes configuration options to a file named \fB\&.barman.auto.conf\fP, located in the \fBbarman_home\fP directory. This configuration file has higher precedence and will override values from the global Barman configuration file (usually \fB/etc/barman.conf\fP) and from any included files specified in \fBconfiguration_files_directory\fP (typically files in \fB/etc/barman.d\fP). Be aware of this if you decide to manually modify configuration options in those files later. .UNINDENT .UNINDENT .SS Parameters .INDENT 0.0 .TP .B \fBSTRING\fP List of JSON formatted string. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS Example .sp \fBJSON_STRING=\(aq[{“scope”: “server”, “server_name”: “my_server”, “archiver”: “on”, “streaming_archiver”: “off”}]\(aq\fP .SS \fBbarman cron\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX cron [ { \-h | \-\-help } ] [ \-\-keep\-descriptors ] .EE .UNINDENT .UNINDENT .SS Description .sp Carry out maintenance tasks, such as enforcing retention policies or managing WAL files. .SS Parameters .INDENT 0.0 .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-keep\-descriptors\fP Keep the ^stdout^ and ^stderr^ streams of the Barman subprocesses connected to the main process. This is especially useful for Docker\-based installations. .UNINDENT .SS \fBbarman delete\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX delete [ { \-h | \-\-help } ] SERVER_NAME BACKUP_ID .EE .UNINDENT .UNINDENT .SS Description .sp Delete the specified backup. You can use a shortcut instead of \fBBACKUP_ID\fP\&. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fBBACKUP_ID\fP Id of the backup in barman catalog. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS Shortcuts .sp Use shortcuts instead of \fBBACKUP_ID\fP\&. .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBfirst/oldest\fP T} T{ Oldest available backup for the server, in chronological order. T} _ T{ \fBlast/latest\fP T} T{ Most recent available backup for the server, in chronological order. T} _ T{ \fBlast\-full/latest\-full\fP T} T{ Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&. T} _ T{ \fBlast\-failed\fP T} T{ Most recent backup that failed, in chronological order. T} .TE .SS \fBbarman diagnose\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX diagnose [ { \-h | \-\-help } ] [ \-\-show\-config\-source ] .EE .UNINDENT .UNINDENT .SS Description .sp Display diagnostic information about the Barman node, which is the server where Barman is installed, as well as all configured Postgres servers. This includes details such as global configuration, SSH version, Python version, rsync version, the current configuration and status of all servers, and many more. .SS Parameters .INDENT 0.0 .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-show\-config\-source\fP Include the source file which provides the effective value for each configuration option. .UNINDENT .SS \fBbarman export\-backup\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX export\-backup [ { \-h | \-\-help } ] [ \-\-compression { gzip | bzip2 | xz } ] [ \-\-compression\-level COMPRESSION_LEVEL ] SERVER_NAME BACKUP_ID OUTPUT_DIRECTORY .EE .UNINDENT .UNINDENT .SS Description .sp Export the specified backup as a single tarball, suitable for hand\-off to an external archival system. The tarball is self\-contained: it bundles the backup data files, any tablespaces, the WAL segments required to bring the backup to a consistent state, and the Barman metadata needed to re\-register the backup with barman import\-backup \%<#\:commands-barman-import-backup> later. .sp The generated file is named using the pattern \fBbackup\-export\-SERVER_NAME\-BACKUP_ID\-TIMESTAMP\-CHECKSUM.tar[.gz|.bz2|.xz]\fP\&. The filename is part of the integrity contract — do not rename the tarball, or barman import\-backup \%<#\:commands-barman-import-backup> will refuse it. .sp Only full backups in \fBDONE\fP state on a server using local storage can be exported. See Backup export and import \%<#\:user-guide-export-import> for the full feature description. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node. .TP .B \fBBACKUP_ID\fP Id of the backup in barman catalog. .TP .B \fBOUTPUT_DIRECTORY\fP Existing directory where the exported tarball will be written. Must be writable and executable by the user running Barman. .TP .B \fB\-\-compression {gzip | bzip2 | xz}\fP Compress the outer tarball using the given algorithm. By default the tarball is not compressed. Compression applies only to the outer tarball; data files and WAL segments stored inside are not recompressed, and any pre\-existing WAL compression is preserved through the associated \fBxlog.db\fP metadata. .TP .B \fB\-\-compression\-level COMPRESSION_LEVEL\fP Compression level to pass to the chosen algorithm. Valid levels are \fB1\fP\-\fB9\fP for \fBgzip\fP and \fBbzip2\fP, and \fB0\fP\-\fB9\fP for \fBxz\fP\&. Defaults to the algorithm\(aqs own default level. Requires \fB\-\-compression\fP to be set. .sp \fBNote:\fP .INDENT 7.0 .INDENT 3.5 Passing an explicit \fB\-\-compression\-level\fP requires Python 3.12 or newer for \fBgzip\fP/\fBbzip2\fP and Python 3.14 or newer for \fBxz\fP\&. On older interpreters the option is accepted, a warning is emitted, and the algorithm\(aqs default level is used instead. .UNINDENT .UNINDENT .UNINDENT .SS \fBbarman generate\-manifest\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX generate\-manifest [ { \-h | \-\-help } ] SERVER_NAME BACKUP_ID .EE .UNINDENT .UNINDENT .SS Description .sp Generates a \fBbackup_manifest\fP file for a backup. You can use a shortcut instead of \fBBACKUP_ID\fP\&. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fBBACKUP_ID\fP Id of the backup in barman catalog. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS Shortcuts .sp Use shortcuts instead of \fBBACKUP_ID\fP\&. .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBfirst/oldest\fP T} T{ Oldest available backup for the server, in chronological order. T} _ T{ \fBlast/latest\fP T} T{ Most recent available backup for the server, in chronological order. T} _ T{ \fBlast\-full/latest\-full\fP T} T{ Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&. T} _ T{ \fBlast\-failed\fP T} T{ Most recent backup that failed, in chronological order. T} .TE .SS \fBbarman get\-wal\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX get\-wal [ { \-\-bzip | \-j } ] [ { \-\-gzip | \-z | \-x } ] [ { \-h | \-\-help } ] [ \-\-keep\-compression ] [ { \-\-output\-directory | \-o } OUTPUT_DIRECTORY ] [ { \-\-peek | \-p } VALUE ] [ { \-P | \-\-partial } ] [ { \-t | \-\-test } ] SERVER_NAME WAL_NAME .EE .UNINDENT .UNINDENT .SS Description .sp Retrieve a WAL file from the xlog archive of a specified server. By default, if the requested WAL file is found, it is returned as uncompressed content to \fBSTDOUT\fP\&. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fBWAL_NAME\fP Id of the backup in barman catalog. .TP .B \fB\-\-bzip2\fP / \fB\-j\fP Output will be compressed using bzip2. .TP .B \fB\-\-gzip\fP / \fB\-z\fP / \fB\-x\fP Output will be compressed using gzip. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-keep\-compression\fP Do not decompress the file content. The output will be the original compressed file. .TP .B \fB\-\-output\-directory\fP / \fB\-o\fP Destination directory where barman will store the WAL file. .TP .B \fB\-\-peek\fP / \fB\-p\fP Specify an integer value greater than or equal to 1 to retrieve WAL files from the specified WAL file up to the value specified by this parameter. When using this option, \fBget\-wal\fP returns a list of zero to the specified WAL segment names, with one name per row. .TP .B \fB\-P\fP / \fB\-\-partial\fP Additionally, collect partial WAL files (.partial). .TP .B \fB\-t\fP / \fB\-\-test\fP Test both the connection and configuration of the specified Postgres server in Barman for WAL retrieval. When this option is used, the required \fBWAL_NAME\fP argument is disregarded. .UNINDENT .sp \fBWarning:\fP .INDENT 0.0 .INDENT 3.5 \fB\-z\fP / \fB\-\-gzip\fP and \fB\-j\fP / \fB\-\-bzip2\fP options are deprecated and will be removed in the future. For WAL compression, please make sure to enable it directly on the Barman server via the \fBcompression\fP configuration option. .UNINDENT .UNINDENT .SS \fBbarman import\-backup\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX import\-backup [ { \-h | \-\-help } ] SERVER_NAME INPUT_TARBALL .EE .UNINDENT .UNINDENT .SS Description .sp Register a previously exported backup tarball back into the Barman catalog of \fBSERVER_NAME\fP\&. The tarball is expected to be the output of barman export\-backup \%<#\:commands-barman-export-backup> (or a file restored to disk verbatim by an external archival system from such an export). After a successful import, the backup is fully usable: it appears in barman list\-backups \%<#\:commands-barman-list-backups>, its metadata is available via barman show\-backup \%<#\:commands-barman-show-backup>, and it can be restored with barman restore \%<#\:commands-barman-restore>\&. .sp Imported backups are automatically protected from retention by applying the \fBKEEP:STANDALONE\fP annotation (see barman keep \%<#\:commands-barman-keep>). If you want the imported backup to participate in retention again, remove the annotation explicitly. .sp Import is performed atomically: the tarball is extracted into a staging directory under \fBbasebackups_directory\fP, verified end\-to\-end, and only then moved into place. If any step fails, the staging area is cleaned up and the catalog and WAL archive are left untouched. See this section Backup export and import \%<#\:user-guide-export-import> for the full feature description. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node. .TP .B \fBINPUT_TARBALL\fP Path to the export tarball to import. .UNINDENT .SS \fBbarman keep\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX keep [ { \-h | \-\-help } ] { { \-r | \-\-release } | { \-s | \-\-status } | \-\-target { full | standalone } } SERVER_NAME BACKUP_ID .EE .UNINDENT .UNINDENT .SS Description .sp Mark the specified backup with a \fBtarget\fP as an archival backup to be retained indefinitely, overriding any active retention policies. You can also check the keep \fBstatus\fP of a backup and \fBrelease\fP the keep mark from a backup. You can use a shortcut instead of \fBBACKUP_ID\fP\&. .sp \fBNote:\fP .INDENT 0.0 .INDENT 3.5 Incremental backups are not eligible for the \fBkeep\fP command. This restriction exists because incremental backups rely on their parent backups and cannot be used on their own for recovery. Keeping an incremental without its base would serve no purpose, as it is unusable independently. .sp If you attempt to apply keep to an incremental backup, Barman will return an error indicating that incremental backups cannot be kept. .sp \fBOnly the full base backup —the one that starts the backup chain— can be marked with keep.\fP .UNINDENT .UNINDENT .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fBBACKUP_ID\fP Id of the backup in barman catalog. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-r\fP / \fB\-\-release\fP Release the keep mark from this backup. This will remove its archival status and make it available for deletion, either directly or by retention policy. .TP .B \fB\-s\fP / \fB\-\-status\fP Report the archival status of the backup. The status will be either \fBfull\fP or \fBstandalone\fP for archival backups, or \fBnokeep\fP for backups that have not been designated as archival. .TP .B \fB\-\-target\fP Define the recovery target for the archival backup. The possible values are: .INDENT 7.0 .IP \(bu 2 \fBfull\fP: The backup can be used to recover to the most recent point in time. To support this, Barman will keep all necessary WALs to maintain the backup\(aqs consistency as well as any subsequent WALs. .IP \(bu 2 \fBstandalone\fP: The backup can only be used to restore the server to its state at the time of the backup. Barman will retain only the WALs required to ensure the backup\(aqs consistency. .UNINDENT .UNINDENT .SS Shortcuts .sp Use shortcuts instead of \fBBACKUP_ID\fP\&. .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBfirst/oldest\fP T} T{ Oldest available backup for the server, in chronological order. T} _ T{ \fBlast/latest\fP T} T{ Most recent available backup for the server, in chronological order. T} _ T{ \fBlast\-full/latest\-full\fP T} T{ Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&. T} _ T{ \fBlast\-failed\fP T} T{ Most recent backup that failed, in chronological order. T} .TE .SS \fBbarman list\-backups\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX list\-backups [ { \-h | \-\-help } ] [ \-\-minimal ] SERVER_NAME .EE .UNINDENT .UNINDENT .SS Description .sp Display the available backups for a server. This command is useful for retrieving both the backup ID and the backup type. You can find details about this command in Catalog usage \%<#\:catalog-usage-list-backups>\&. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-minimal\fP Machine readable output. .UNINDENT .SS Shortcuts .sp Use shortcuts instead of \fBSERVER_NAME\fP\&. .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBall\fP T} T{ All available servers T} .TE .SS \fBbarman list\-files\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX list\-files [ { \-h | \-\-help } ] [ \-\-target { data | full | standalone | wal } ] [ \-\-list\-empty\-directories ] SERVER_NAME BACKUP_ID .EE .UNINDENT .UNINDENT .SS Description .sp List all files in a specific backup. You can use a shortcut instead of \fBBACKUP_ID\fP\&. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fBBACKUP_ID\fP Id of the backup in barman catalog. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-target\fP Define specific files to be listed. The possible values are: .INDENT 7.0 .IP \(bu 2 \fBstandalone\fP (default): List the base backup files, including required WAL files. .IP \(bu 2 \fBdata\fP: List just the data files. .IP \(bu 2 \fBwal\fP: List all the WAL files between the start of the base backup and the end of the log or the start of the following base backup (depending on whether the specified base backup is the most recent one available). .IP \(bu 2 \fBfull\fP: same as \fBdata\fP + \fBwal\fP\&. .UNINDENT .TP .B \fB\-\-list\-empty\-directories\fP Add empty directories to the listing. .UNINDENT .SS Shortcuts .sp Use shortcuts instead of \fBBACKUP_ID\fP\&. .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBfirst/oldest\fP T} T{ Oldest available backup for the server, in chronological order. T} _ T{ \fBlast/latest\fP T} T{ Most recent available backup for the server, in chronological order. T} _ T{ \fBlast\-full/latest\-full\fP T} T{ Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&. T} _ T{ \fBlast\-failed\fP T} T{ Most recent backup that failed, in chronological order. T} .TE .SS \fBbarman list\-processes\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX list\-processes [ { \-h | \-\-help } ] SERVER_NAME .EE .UNINDENT .UNINDENT .SS Description .sp The \fBlist\-processes\fP sub\-command outputs all active subprocesses for a Postgres server. It displays the process identifier (PID) and the corresponding barman task for each active subprocess. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the Postgres server for which to list active subprocesses. .TP .B \fB\-h\fP / \fB\-\-help\fP Displays a help message and exits. .UNINDENT .SS \fBbarman list\-servers\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX list\-servers [ { \-h | \-\-help } ] [ \-\-minimal ] .EE .UNINDENT .UNINDENT .SS Description .sp Display all configured servers along with their descriptions. .SS Parameters .INDENT 0.0 .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-minimal\fP Machine readable output. .UNINDENT .SS \fBbarman lock\-directory\-cleanup\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX lock\-directory\-cleanup [ { \-h | \-\-help } ] .EE .UNINDENT .UNINDENT .SS Description .sp Automatically removes unused lock files from the \fBbarman_lock_directory\fP\&. .SS Parameters .INDENT 0.0 .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS \fBbarman put\-wal\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX put\-wal [ { \-h | \-\-help } ] [ { \-t | \-\-test } ] SERVER_NAME .EE .UNINDENT .UNINDENT .SS Description .sp Receive a WAL file from a remote server and securely save it into the server incoming directory. The WAL file should be provided via \fBSTDIN\fP, encapsulated in a tar stream along with a \fBSHA256SUMS\fP or \fBMD5SUMS\fP file for validation (\fBsha256\fP is the default hash algorithm, but the user can choose \fBmd5\fP when setting the \fBarchive\-command\fP via \fBbarman\-wal\-archive\fP). This command is intended to be executed via SSH from a remote \fBbarman\-wal\-archive\fP utility (included in the barman\-cli package). Avoid using this command directly unless you fully manage the content of the files. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-t\fP / \fB\-\-test\fP Test both the connection and configuration of the specified Postgres server in Barman for WAL retrieval. .UNINDENT .SS \fBbarman rebuild\-xlogdb\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX rebuild\-xlogdb [ { \-h | \-\-help } ] SERVER_NAME [ SERVER_NAME ... ] .EE .UNINDENT .UNINDENT .SS Description .sp Rebuild the WAL file metadata for a server (or for all servers using the \fBall\fP shortcut) based on the disk content. The WAL archive metadata is stored in the \fBxlog.db\fP file, with each Barman server maintaining its own copy. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS Shortcuts .sp Use shortcuts instead of \fBSERVER_NAME\fP\&. .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBall\fP T} T{ All available servers T} .TE .SS \fBbarman recover\fP .sp \fBNote:\fP .INDENT 0.0 .INDENT 3.5 This command is deprecated. Use the barman restore \%<#\:commands-barman-restore> command instead. .UNINDENT .UNINDENT .SS \fBbarman receive\-wal\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX receive\-wal [ \-\-create\-slot ] [ \-\-if\-not\-exists ] [ \-\-drop\-slot ] [ { \-h | \-\-help } ] [ \-\-reset ] [ \-\-stop ] SERVER_NAME .EE .UNINDENT .UNINDENT .SS Description .sp Initiate the streaming of transaction logs for a server. This process uses \fBpg_receivewal\fP or \fBpg_receivexlog\fP to receive WAL files from Postgres servers via the streaming protocol. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node. .TP .B \fB\-\-create\-slot\fP Create the physical replication slot configured with the \fBslot_name\fP configuration parameter. .TP .B \fB\-\-if\-not\-exists\fP Do not error out when \fB\-\-create\-slot\fP is specified and a slot with the specified name already exists. .TP .B \fB\-\-drop\-slot\fP Drop the physical replication slot configured with the \fBslot_name\fP configuration parameter. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-reset\fP Reset the status of \fBreceive\-wal\fP, restarting the streaming from the current WAL file of the server. .TP .B \fB\-\-stop\fP Stop the process for the server. .UNINDENT .sp \fBWarning:\fP .INDENT 0.0 .INDENT 3.5 The \fB\-\-stop\fP option for the \fBbarman receive\-wal\fP command will be obsoleted in a future release. Users should favor using the terminate\-process \%<#\:commands-barman-terminate-process> command instead, which is the new way of handling this feature. .UNINDENT .UNINDENT .SS \fBbarman restore\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX restore [ \-\-aws\-region AWS_REGION } ] [ \-\-azure\-resource\-group AZURE_RESOURCE_GRP ] [ \-\-bwlimit KBPS ] [ \-\-exclusive ] [ \-\-gcp\-zone GCP_ZONE ] [ { \-\-get\-wal | \-\-no\-get\-wal } ] [ { \-h | \-\-help } ] [ { \-j | \-\-jobs } PARALLEL_WORKERS ] [ \-\-jobs\-start\-batch\-period SECONDS ] [ \-\-jobs\-start\-batch\-size NUMBER ] [ \-\-local\-staging\-path PATH ] [ { \-\-network\-compression | \-\-no\-network\-compression } ] [ \-\-no\-retry ] [ \-\-partial\-wal ] [ \-\-recovery\-conf\-filename FILENAME ] [ \-\-recovery\-staging\-path PATH ] [ \-\-staging\-path STAGING_PATH ] [ \-\-staging\-location STAGING_LOCATION ] [ \-\-combine\-mode COMBINE_MODE ] [ \-\-remote\-ssh\-command STRING ] [ \-\-restore\-command COMMAND ] [ \-\-retry\-sleep SECONDS ] [ \-\-retry\-times NUMBER ] [ \-\-snapshot\-recovery\-instance INSTANCE_NAME ] [ \-\-snapshot\-recovery\-zone GCP_ZONE ] [ \-\-skip\-archive\-wal ] [ \-\-standby\-mode ] [ \-\-tablespace NAME:LOCATION [ \-\-tablespace NAME:LOCATION ... ] ] [ \-\-target\-action { pause | shutdown | promote } ] [ \-\-target\-immediate ] [ \-\-target\-lsn LSN ] [ \-\-target\-name RESTORE_POINT_NAME ] [ \-\-target\-time TIMESTAMP ] [ \-\-target\-tli TLI ] [ \-\-target\-xid XID ] [ \-\-staging\-wal\-directory ] SERVER_NAME BACKUP_ID DESTINATION_DIR .EE .UNINDENT .UNINDENT .SS Description .sp Execute a PostreSQL server restore operation. Barman will restore the backup from a server in the destination directory. The restoration can be performed locally (on the barman node itself) or remotely (on another machine accessible via SSH). The location is determined by whether or not the \fB\-\-remote\-ssh\-command\fP option is used. More information on this command can be found in the Recovery \%<#\:recovery> section. You can use a shortcut instead of \fBBACKUP_ID\fP\&. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fBBACKUP_ID\fP Id of the backup in the barman catalog. Use \fBauto\fP to have Barman automatically find the most suitable backup for the restore operation. .TP .B \fBDESTINATION_DIR\fP Destination directory to restore the backup. .TP .B \fB\-\-aws\-region\fP Specify the AWS region where the instance and disks for snapshot recovery are located. This option allows you to override the \fBaws_region\fP value in the Barman configuration. .TP .B \fB\-\-azure\-resource\-group\fP Specify the Azure resource group containing the instance and disks for snapshot recovery. This option allows you to override the \fBazure_resource_group\fP value in the Barman configuration. .TP .B \fB\-\-bwlimit\fP Specify the maximum transfer rate in kilobytes per second. A value of \fB0\fP indicates no limit. This setting overrides the \fBbandwidth_limit\fP configuration option. .TP .B \fB\-\-delta\-restore\fP / \fB\-\-no\-delta\-restore\fP Enable/disable usage of \fBdelta\-restore\fP for a delta recovery. Default is based on \fBrecovery_options\fP setting. .TP .B \fB\-\-exclusive\fP Set target (time, XID or LSN) to be non inclusive. .TP .B \fB\-\-gcp\-zone\fP Specify the GCP zone where the instance and disks for snapshot recovery are located. This option allows you to override the \fBgcp_zone\fP value in the Barman configuration. .TP .B \fB\-\-get\-wal\fP / \fB\-\-no\-get\-wal\fP Enable/disable usage of \fBget\-wal\fP for WAL fetching during recovery. Default is based on \fBrecovery_options\fP setting. .sp \fBNote:\fP .INDENT 7.0 .INDENT 3.5 When \fBwals_directory\fP is configured to use cloud storage (e.g. S3, Azure, GCS), restores always require \fBget\-wal\fP for WAL fetching. If you specify \fB\-\-no\-get\-wal\fP or omit \fBget\-wal\fP from \fBrecovery_options\fP, Barman will automatically enable \fBget\-wal\fP for the restore operation and issue a warning. .UNINDENT .UNINDENT .TP .B \fB\-\-partial\-wal\fP Copy \fB\&.partial\fP WAL files to the recovery destination with the \fB\&.partial\fP suffix stripped. Barman considers two sources: \fB\&.partial\fP files in the \fBstreaming_wals_directory\fP (written by \fBpg_receivewal\fP) and \fB\&.partial\fP files in the main WAL archive (archived during standby promotion, possibly compressed or encrypted). Only applicable when using \fB\-\-no\-get\-wal\fP\&. When \fB\-\-get\-wal\fP is used, \fB\&.partial\fP files are already handled transparently and this option has no effect. The flag also has no effect when \fB\-\-target\-immediate\fP is used, since recovery stops at the first consistent state before any partial WAL would be needed. See Partial WAL files during recovery \%<#\:recovery-partial-wal-files> for details. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-j\fP / \fB\-\-jobs\fP Specify the number of parallel workers to use for copying files during the backup. This setting overrides the \fBparallel_jobs\fP parameter if it is specified in the configuration file. .TP .B \fB\-\-jobs\-start\-batch\-period\fP Specify the time period, in seconds, for starting a single batch of jobs. This value overrides the \fBparallel_jobs_start_batch_period\fP parameter if it is set in the configuration file. The default is \fB1\fP second. .TP .B \fB\-\-jobs\-start\-batch\-size\fP Specify the maximum number of parallel workers to initiate in a single batch. This value overrides the \fBparallel_jobs_start_batch_size\fP parameter if it is defined in the configuration file. The default is \fB10\fP workers. .TP .B \fB\-\-local\-staging\-path\fP Specify path on the Barman host where the chain of backups will be combined before being copied to the destination directory. The contents created within the staging path will be removed upon completion of the restore process. This option is necessary for restoring from block\-level incremental backups and has no effect otherwise. .sp Deprecated since version 3.15: \fB\-\-local\-staging\-path\fP is deprecated and will be removed in a future release. Use \fB\-\-staging\-path\fP and \fB\-\-staging\-location\fP instead. .TP .B \fB\-\-network\-compression\fP / \fB\-\-no\-network\-compression\fP Enable/disable network compression during remote restore. Default is based on \fBnetwork_compression\fP configuration setting. .TP .B \fB\-\-no\-retry\fP There will be no retry in case of an error. It is the same as setting \fB\-\-retry\-times 0\fP\&. .TP .B \fB\-\-recovery\-conf\-filename\fP Specify the name of the file where Barman should write recovery options when recovering backups for Postgres versions 12 and later. By default, this is set to \fBpostgresql.auto.conf\fP\&. However, if \fB\-\-recovery\-conf\-filename\fP is specified, recovery options will be written to the specified value instead. While the default value is suitable for most Postgres installations, this option allows you to specify an alternative location if Postgres is managed by tools that alter the configuration mechanism (for example, if \fBpostgresql.auto.conf\fP is symlinked to \fB/dev/null\fP). .TP .B \fB\-\-recovery\-staging\-path\fP Specify a path on the recovery host where files for a compressed backup will be staged before being decompressed to the destination directory. Backups will be staged in their own directory within the staging path, following the naming convention: \fBbarman\-staging\-SERVER_NAME\-BACKUP_ID\fP\&. This staging directory will be removed after the restore process is complete. This option is mandatory for restoring from compressed backups and has no effect otherwise. .sp Deprecated since version 3.15: \fB\-\-recovery\-staging\-path\fP is deprecated and will be removed in a future release. Use \fB\-\-staging\-path\fP and \fB\-\-staging\-location\fP instead. .TP .B \fB\-\-staging\-path\fP A path where intermediate files are staged during restore. When restoring a compressed backup, it serves as a temporary location for decompression before copying to the final destination. When restoring an incremental backup, it is where backups are combined before copying to the final destination. This location must have enough space to store the decompressed/combined backup. .TP .B \fB\-\-staging\-location\fP Specifies whether \fB\-\-staging\-path\fP is a local or remote path. Valid values are \fBlocal\fP and \fBremote\fP\&. .TP .B \fB\-\-combine\-mode\fP Specifies a copy mode for \fBpg_combinebackup\fP when combining incremental backups during a restore. .sp Options include: .INDENT 7.0 .IP \(bu 2 \fBcopy\fP (default): Use standard file copying when combining incremental backups. .IP \(bu 2 \fBlink\fP: Use hard links when combining incremental backups. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space. .IP \(bu 2 \fBclone\fP: Use efficient file cloning (also known as “reflinks” on some systems) instead of copying files to the new data directory, which can result in near\-instantaneous copying of the data files. .IP \(bu 2 \fBcopy\-file\-range\fP: Use the \fBcopy_file_range\fP system call for efficient copying. On some file systems this gives results similar to \fBclone\fP, sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. .UNINDENT .sp Refer to the pg_combinebackup documentation \% for more details and restrictions of each mode. .TP .B \fB\-\-remote\-ssh\-command\fP This option enables remote restore by specifying the secure shell command to execute on a remote host. It functions similarly to the \fBssh_command\fP server option in the configuration file for remote restore, that is, \fB\(aqssh USER@SERVER\(aq\fP\&. .TP .B \fB\-\-restore\-command\fP Specify a custom restore command to override Barman\(aqs default restore_command in the PostgreSQL recovery configuration. While the default restore_command built by Barman is suitable for most cases, this option allows you to specify an alternative command if your setup requires it. Can be used only when running a restore with \fBget\-wal\fP mode. .TP .B \fB\-\-retry\-sleep\fP Specify the number of seconds to wait after a failed copy before retrying. This setting applies to both backup and restore operations and overrides the \fBbasebackup_retry_sleep\fP parameter if it is defined in the configuration file. .TP .B \fB\-\-retry\-times\fP Specify the number of times to retry the base backup copy in case of an error. This applies to both backup and restore operations and overrides the \fBbasebackup_retry_times\fP parameter if it is set in the configuration file. .TP .B \fB\-\-snapshot\-recovery\-instance\fP Specify the name of the instance where the disks recovered from the snapshots are attached. This option is necessary when recovering backups created with \fBbackup_method=snapshot\fP\&. .TP .B \fB\-\-snapshot\-recovery\-zone\fP (deprecated) Zone containing the instance and disks for the snapshot recovery (deprecated: replaced by \fB\-\-gcp\-zone\fP) .TP .B \fB\-\-standby\-mode\fP Whether to start the Postgres server as a standby. .TP .B \fB\-\-tablespace\fP Specify tablespace relocation rule. \fBNAME\fP is the tablespace name and \fBLOCATION\fP is the recovery host destination path to restore the tablespace. .TP .B \fB\-\-target\-action\fP Trigger the specified action when the recovery target is reached. This option requires defining a target along with one of these actions. The possible values are: .INDENT 7.0 .IP \(bu 2 \fBpause\fP: Once recovery target is reached, the server is started in pause state, allowing users to inspect the instance .IP \(bu 2 \fBpromote\fP: Once recovery target is reached, the server will exit the recovery operation and is promoted as a master. .IP \(bu 2 \fBshutdown\fP: Once recovery target is reached, the server is shut down. .UNINDENT .TP .B \fB\-\-target\-immediate\fP Recovery is completed when a consistent state is reached (end of the base backup). .TP .B \fB\-\-target\-lsn\fP Recover to the specified LSN (Log Sequence Number). Requires Postgres 10 or above. .TP .B \fB\-\-target\-name\fP Recover to the specified name of a restore point previously created with the \fBpg_create_restore_point(name)\fP\&. .TP .B \fB\-\-target\-time\fP Recover to the specified time. Use the format \fBYYYY\-MM\-DD HH:MM:SS.mmm\fP\&. .TP .B \fB\-\-target\-tli\fP Recover the specified timeline. You can use the special values \fBcurrent\fP and \fBlatest\fP in addition to a numeric timeline ID. For Postgres versions 12 and above, the default is to recover to the latest timeline in the WAL archive. For Postgres versions below 12, the default is to recover to the timeline that was current at the time the backup was taken. .TP .B \fB\-\-target\-xid\fP Recover to the specified transaction ID. .UNINDENT .INDENT 0.0 .TP .B \fB\-\-skip\-archive\-wal\fP Skip archiving staged WAL files before starting the restore. By default, \fBbarman restore\fP archives any WAL files in the server\(aqs \fBincoming\fP/ \fBstreaming\fP directory before restoring to reduce RPO in DR scenarios. Use this option when you want to skip this step. .TP .B \fB\-\-staging\-wal\-directory\fP A staging directory on the destination host for WAL files when performing PITR. If unspecified, it uses a \fBbarman_wal\fP directory inside the destination directory. .UNINDENT .SS Shortcuts .sp Use shortcuts instead of \fBBACKUP_ID\fP\&. .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBfirst/oldest\fP T} T{ Oldest available backup for the server, in chronological order. T} _ T{ \fBlast/latest\fP T} T{ Most recent available backup for the server, in chronological order. T} _ T{ \fBlast\-full/latest\-full\fP T} T{ Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&. T} _ T{ \fBlast\-failed\fP T} T{ Most recent backup that failed, in chronological order. T} .TE .SS \fBbarman replication\-status\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX replication\-status [ { \-h | \-\-help } ] [ \-\-minimal ] [ \-\-source { backup\-host | wal\-host } ] [ \-\-target { hot\-standby | wal\-streamer | all } ] SERVER_NAME [ SERVER_NAME ... ] .EE .UNINDENT .UNINDENT .SS Description .sp Display real\-time information and status of any streaming clients connected to the specified server. Specify \fBall\fP shortcut to display information for all configured servers. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-minimal\fP Machine readable output. .TP .B \fB\-\-source\fP The possible values are: .INDENT 7.0 .IP \(bu 2 \fBbackup\-host\fP (default): List clients using the backup connection information for a server. .IP \(bu 2 \fBwal\-host\fP: List clients using the WAL streaming connection information for a server. .UNINDENT .TP .B \fB\-\-target\fP The possible values are: .INDENT 7.0 .IP \(bu 2 \fBhot\-standby\fP: List only hot standby servers. .IP \(bu 2 \fBwal\-streamer\fP: List only WAL streaming clients, such as \fBpg_receivewal\fP\&. .IP \(bu 2 \fBall\fP (default): List all streaming clients. .UNINDENT .UNINDENT .SS Shortcuts .sp Use shortcuts instead of \fBSERVER_NAME\fP\&. .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBall\fP T} T{ All available servers T} .TE .SS \fBbarman show\-backup\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX show\-backup [ { \-h | \-\-help } ] SERVER_NAME BACKUP_ID .EE .UNINDENT .UNINDENT .SS Description .sp Display detailed information about a specific backup. You can find details about this command in Catalog usage \%<#\:catalog-usage-show-backup>\&. You can use a shortcut instead of \fBBACKUP_ID\fP\&. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fBBACKUP_ID\fP Id of the backup in barman catalog. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS Shortcuts .sp Use shortcuts instead of \fBBACKUP_ID\fP\&. .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBfirst/oldest\fP T} T{ Oldest available backup for the server, in chronological order. T} _ T{ \fBlast/latest\fP T} T{ Most recent available backup for the server, in chronological order. T} _ T{ \fBlast\-full/latest\-full\fP T} T{ Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&. T} _ T{ \fBlast\-failed\fP T} T{ Most recent backup that failed, in chronological order. T} .TE .SS \fBbarman show\-servers\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX show\-servers [ { \-h | \-\-help } ] SERVER_NAME [ SERVER_NAME ... ] .EE .UNINDENT .UNINDENT .SS Description .sp Display detailed information about a server, including \fBconninfo\fP, \fBbackup_directory\fP, \fBwals_directory\fP, \fBarchive_command\fP, and many more. To view information about all configured servers, specify the \fBall\fP shortcut instead of the server name. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS Shortcuts .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBall\fP T} T{ All available servers T} .TE .SS \fBbarman status\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX status [ { \-h | \-\-help } ] SERVER_NAME [ SERVER_NAME ... ] .EE .UNINDENT .UNINDENT .SS Description .sp Display information about a server\(aqs status, including details such as the state, Postgres version, WAL information, available backups and more. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS Shortcuts .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBall\fP T} T{ All available servers T} .TE .SS \fBbarman switch\-wal\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX switch\-wal [ \-\-archive ] [ \-\-archive\-timeout ] [ \-\-force ] [ { \-h | \-\-help } ] SERVER_NAME [ SERVER_NAME ... ] .EE .UNINDENT .UNINDENT .SS Description .sp Execute \fBpg_switch_wal()\fP on the target server (Postgres versions 10 and later) or \fBpg_switch_xlog()\fP (for Postgres versions 8.3 to 9.6). .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fB\-\-archive\fP Waits for one WAL file to be archived. If no WAL file is archived within a specified time (default: \fB30\fP seconds), Barman will terminate with a failure exit code. This option is also available on standby servers. .TP .B \fB\-\-archive\-timeout\fP Specify the amount of time in seconds (default: \fB30\fP seconds) that the archiver will wait for a new WAL file to be archived before timing out. This option is also available on standby servers. .TP .B \fB\-\-force\fP Forces the switch by executing a CHECKPOINT before \fBpg_switch_wal()\fP\&. .sp \fBNote:\fP .INDENT 7.0 .INDENT 3.5 Running a CHECKPOINT may increase I/O load on the Postgres server, so use this option cautiously. .UNINDENT .UNINDENT .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS \fBbarman switch\-xlog\fP .SS Description .sp Alias for the \fBswitch\-wal\fP command. .SS \fBbarman sync\-backup\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX sync\-backup [ { \-h | \-\-help } ] SERVER_NAME BACKUP_ID .EE .UNINDENT .UNINDENT .SS Description .sp This command synchronizes a passive node with its primary by copying all files from a backup present on the server node. It is available only for passive nodes and uses the \fBprimary_ssh_command\fP option to establish a secure connection with the primary node. You can use a shortcut instead of \fBBACKUP_ID\fP\&. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fBBACKUP_ID\fP Id of the backup in barman catalog. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS Shortcuts .sp For some commands, instead of using the timestamp backup ID, you can use the following shortcuts or aliases to identify a backup for a given server: .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBfirst/oldest\fP T} T{ Oldest available backup for the server, in chronological order. T} _ T{ \fBlast/latest\fP T} T{ Most recent available backup for the server, in chronological order. T} _ T{ \fBlast\-full/latest\-full\fP T} T{ Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&. T} _ T{ \fBlast\-failed\fP T} T{ Most recent backup that failed, in chronological order. T} .TE .SS \fBbarman sync\-info\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX sync\-info [ { \-h | \-\-help } ] [ \-\-primary ] SERVER_NAME [ LAST_WAL [ LAST_POS ] ] .EE .UNINDENT .UNINDENT .SS Description .sp Gather information about the current status of a Barman server for synchronization purposes. .sp This command returns a JSON output for a server that includes: all successfully completed backups, all archived WAL files, the configuration, the last WAL file read from \fBxlog.db\fP, and its position within the file. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fBLAST_WAL\fP Instructs sync\-info to skip any WAL files that precede the specified file (for incremental synchronization). .TP .B \fBLAST_POS\fP Hint for quickly positioning in the \fBxlog.db\fP file (for incremental synchronization). .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .TP .B \fB\-\-primary\fP Execute the sync\-info on the primary node (if set). .UNINDENT .SS \fBbarman sync\-wals\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX sync\-wals [ { \-h | \-\-help } ] SERVER_NAME .EE .UNINDENT .UNINDENT .SS Description .sp This command synchronizes a passive node with its primary by copying all archived WAL files from the server node. It is available only for passive nodes and utilizes the \fBprimary_ssh_command\fP option to establish a secure connection with the primary node. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS \fBbarman terminate\-process\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX terminate\-process SERVER_NAME TASK_NAME .EE .UNINDENT .UNINDENT .SS Description .sp The \fBbarman terminate\-process\fP command terminates an active Barman subprocess on a specified server. The target process is identified by its task name (for example, \fBbackup\fP or \fBreceive\-wal\fP). Note that only processes that are running on the server level can be terminated, so global processes like \fBcron\fP or \fBconfig\-update\fP can not be terminated by this command. .sp You can also use the output of \fBbarman list\-processes\fP to display all active processes for a given server and determine which tasks can be terminated. More details about this command can be found in barman list\-processes \%<#\:commands-barman-list-processes>\&. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP The name of the server where the subprocess is running. .TP .B \fBTASK_NAME\fP The task name that identifies the subprocess to be terminated. .UNINDENT .SS \fBbarman verify\-backup\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX verify\-backup [ { \-h | \-\-help } ] SERVER_NAME BACKUP_ID .EE .UNINDENT .UNINDENT .SS Description .sp Runs \fBpg_verifybackup\fP on a backup manifest file (available since Postgres version 13). For rsync backups, it can be used after creating a manifest file using the \fBgenerate\-manifest\fP command. Requires \fBpg_verifybackup\fP to be installed on the backup server. You can use a shortcut instead of \fBBACKUP_ID\fP\&. .sp Starting with Postgres 18, tar\-format backups taken with the \fBpostgres\fP backup method can also be verified, including those compressed with \fBgzip\fP, \fBlz4\fP or \fBzstd\fP\&. Verifying tar or compressed backups requires \fBpg_verifybackup\fP from Postgres 18 or newer to be available on the backup server, otherwise the command will fail with an error. Encrypted backups are not supported by this command. .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP Name of the server in barman node .TP .B \fBBACKUP_ID\fP Id of the backup in barman catalog. .TP .B \fB\-h\fP / \fB\-\-help\fP Show a help message and exit. Provides information about command usage. .UNINDENT .SS Shortcuts .sp For some commands, instead of using the timestamp backup ID, you can use the following shortcuts or aliases to identify a backup for a given server: .TS box center; l|l. T{ \fBShortcut\fP T} T{ \fBDescription\fP T} _ T{ \fBfirst/oldest\fP T} T{ Oldest available backup for the server, in chronological order. T} _ T{ \fBlast/latest\fP T} T{ Most recent available backup for the server, in chronological order. T} _ T{ \fBlast\-full/latest\-full\fP T} T{ Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&. T} _ T{ \fBlast\-failed\fP T} T{ Most recent backup that failed, in chronological order. T} .TE .SS \fBbarman verify\fP .SS Description .sp Alias for \fBverify\-backup\fP command. .SH BARMAN-CLI COMMANDS .sp The \fBbarman\-cli\fP package includes a collection of recommended client utilities that should be installed alongside the Postgres server. Here are the command references for both utilities. .SS \fBbarman\-wal\-archive\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX barman\-wal\-archive [ { \-h | \-\-help } ] [ { \-V | \-\-version } ] [ { \-U | \-\-user } USER ] [ \-\-port PORT ] [ { { \-z | \-\-gzip } | { \-j | \-\-bzip2 } | \-\-xz | \-\-snappy | \-\-zstd | \-\-lz4 } ] [ \-\-compression\-level COMPRESSION_LEVEL ] [ { \-c | \-\-config } CONFIG ] [ { \-t | \-\-test } ] [ \-\-md5 ] [ { \-p | \-\-parallel } JOBS ] [ \-\-prefetch\-cache\-dir PREFETCH_CACHE_DIR ] BARMAN_HOST SERVER_NAME WAL_PATH .EE .UNINDENT .UNINDENT .SS Description .sp This script can be utilized in the \fBarchive_command\fP of a Postgres server to transfer WAL files to a Barman host using the \fBput\-wal\fP command (introduced in Barman 2.6). It establishes an SSH connection to the Barman host, enabling seamless integration of Barman within Postgres clusters for improved business continuity. .sp \fBExit Statuses\fP are: .INDENT 0.0 .IP \(bu 2 \fB0\fP for \fBSUCCESS\fP\&. .IP \(bu 2 \fBnon\-zero\fP for \fBFAILURE\fP\&. .UNINDENT .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP The server name configured in Barman for the Postgres server from which the WAL file is retrieved. .TP .B \fBBARMAN_HOST\fP The host of the Barman server. .TP .B \fBWAL_PATH\fP The value of the \(aq%p\(aq keyword (according to \fBarchive_command\fP). .TP .B \fB\-h\fP / \fB\-\-help\fP Display a help message and exit. .TP .B \fB\-V\fP / \fB\-\-version\fP Display the program\(aqs version number and exit. .TP .B \fB\-U\fP / \fB\-\-user\fP Specify the user for the SSH connection to the Barman server (defaults to \fBbarman\fP). .TP .B \fB\-\-port\fP Define the port used for the SSH connection to the Barman server. .TP .B \fB\-z\fP / \fB\-\-gzip\fP gzip\-compress the WAL file before sending it to the Barman server. .TP .B \fB\-j\fP / \fB\-\-bzip2\fP bzip2\-compress the WAL file before sending it to the Barman server. .TP .B \fB\-\-xz\fP xz\-compress the WAL file before sending it to the Barman server. .TP .B \fB\-\-snappy\fP snappy\-compress the WAL file before sending it to the Barman server (requires the \fBpython\-snappy\fP Python library to be installed). .TP .B \fB\-\-zstd\fP zstd\-compress the WAL file before sending it to the Barman server (requires the \fBzstandard\fP Python library to be installed). .TP .B \fB\-\-lz4\fP lz4\-compress the WAL file before sending it to the Barman server (requires the \fBlz4\fP Python library to be installed). .TP .B \fB\-\-compression\-level\fP A compression level to be used by the selected compression algorithm. Valid values are integers within the supported range of the chosen algorithm or one of the predefined labels: \fBlow\fP, \fBmedium\fP, and \fBhigh\fP\&. The range of each algorithm as well as what level each predefined label maps to can be found in compression_level \%<#\:configuration-options-compression-level>\&. .TP .B \fB\-c\fP / \fB\-\-config\fP Specify the configuration file on the Barman server. .TP .B \fB\-t\fP / \fB\-\-test\fP Test the connection and configuration of the specified Postgres server in Barman to ensure it is ready to receive WAL files. This option ignores the mandatory argument \fBWAL_PATH\fP\&. .TP .B \fB\-\-md5\fP Use MD5 instead of SHA256 as the hash algorithm to calculate the checksum of the WAL file when transmitting it to the Barman server. This is used to maintain compatibility with older server versions, as older versions of Barman server used to support only MD5. .TP .B \fB\-p\fP / \fB\-\-parallel\fP Specify the maximum number of WAL files to archive in parallel. Defaults to \fB0\fP (no parallelism). .TP .B \fB\-\-prefetch\-cache\-dir\fP Directory where to store cache metadata when using \fB\-\-parallel\fP\&. Defaults to \fB/tmp/barman\-SERVER_NAME\-COMPUTED_HASH\fP\&. .UNINDENT .sp \fBNote:\fP .INDENT 0.0 .INDENT 3.5 When compression is enabled in \fBbarman\-wal\-archive\fP, it takes precedence over the compression settings configured on the Barman server, if they differ. .UNINDENT .UNINDENT .sp \fBImportant:\fP .INDENT 0.0 .INDENT 3.5 When compression is enabled in \fBbarman\-wal\-archive\fP, it is performed on the client side, before the file is sent to Barman. Be mindful of the database server\(aqs load and the chosen compression algorithm and level, as higher compression can delay WAL shipping, causing WAL files to accumulate. .UNINDENT .UNINDENT .SS \fBbarman\-wal\-restore\fP .SS Synopsis .INDENT 0.0 .INDENT 3.5 .sp .EX barman\-wal\-restore [ { \-h | \-\-help } ] [ { \-V | \-\-version } ] [ { \-U | \-\-user } USER ] [ \-\-port PORT ] [ { \-s | \-\-sleep } SECONDS ] [ { \-p | \-\-parallel } JOBS ] [ \-\-spool\-dir SPOOL_DIR ] [ { \-P | \-\-partial } ] [ { { \-z | \-\-gzip } | { \-j | \-\-bzip2 } | \-\-keep\-compression } ] [ { \-c | \-\-config } CONFIG ] [ { \-t | \-\-test } ] BARMAN_HOST SERVER_NAME WAL_NAME WAL_DEST .EE .UNINDENT .UNINDENT .SS Description .sp This script serves as a \fBrestore_command\fP for Postgres servers, enabling the retrieval of WAL files through Barman\(aqs \fBget\-wal\fP feature. It establishes an SSH connection to the Barman host and facilitates the integration of Barman within Postgres clusters, enhancing business continuity. .sp \fBExit Statuses\fP are: .INDENT 0.0 .IP \(bu 2 \fB0\fP for \fBSUCCESS\fP\&. .IP \(bu 2 \fB1\fP for remote get\-wal command \fBFAILURE\fP, likely because the requested WAL could not be found. .IP \(bu 2 \fB2\fP for ssh connection \fBFAILURE\fP\&. .IP \(bu 2 Any other \fBnon\-zero\fP for \fBFAILURE\fP\&. .UNINDENT .SS Parameters .INDENT 0.0 .TP .B \fBSERVER_NAME\fP The server name configured in Barman for the Postgres server from which the WAL file is retrieved. .TP .B \fBBARMAN_HOST\fP The host of the Barman server. .TP .B \fBWAL_NAME\fP The value of the \(aq%f\(aq keyword (according to \fBrestore_command\fP). .TP .B \fBWAL_DEST\fP The value of the \(aq%p\(aq keyword (according to \fBrestore_command\fP). .TP .B \fB\-h\fP / \fB\-\-help\fP Display a help message and exit. .TP .B \fB\-V\fP / \fB\-\-version\fP Display the program\(aqs version number and exit. .TP .B \fB\-U\fP / \fB\-\-user\fP Specify the user for the SSH connection to the Barman server (defaults to \fBbarman\fP). .TP .B \fB\-\-port\fP Define the port used for the SSH connection to the Barman server. .TP .B \fB\-s\fP / \fB\-\-sleep\fP Pause for \fBSECONDS\fP after a failed \fBget\-wal\fP request (defaults to \fB0\fP \- no wait). .TP .B \fB\-p\fP / \fB\-\-parallel\fP Specifies the number of WAL files to fetch in parallel. Default is \fB0\fP (disabled). When set to a value greater than \fB1\fP, fetches the requested WAL file along with the next \fBN \- 1\fP files simultaneously. The additional files are staged in a local spool directory (see \fB\-\-spool\-dir\fP) so that subsequent restore requests can be served immediately from local storage. .TP .B \fB\-\-spool\-dir\fP Directory used for staging extra WALs fetched when using \fB\-\-parallel\fP\&. Default is \fB/var/tmp/walrestore\fP\&. .TP .B \fB\-P\fP / \fB\-\-partial\fP Include partial WAL files (.partial) in the retrieval. .TP .B \fB\-z\fP / \fB\-\-gzip\fP Transfer WAL files compressed with \fBgzip\fP\&. .TP .B \fB\-j\fP / \fB\-\-bzip2\fP Transfer WAL files compressed with \fBbzip2\fP\&. .TP .B \fB\-\-keep\-compression\fP If specified, compressed files will be trasnfered as\-is and decompressed on arrival on the client\-side. .TP .B \fB\-c\fP / \fB\-\-config\fP Specify the configuration file on the Barman server. .TP .B \fB\-t\fP / \fB\-\-test\fP Test the connection and configuration of the specified Postgres server in Barman to ensure it is ready to receive WAL files. This option ignores the mandatory arguments \fBWAL_NAME\fP and \fBWAL_DEST\fP\&. .UNINDENT .sp \fBWarning:\fP .INDENT 0.0 .INDENT 3.5 \fB\-z\fP / \fB\-\-gzip\fP and \fB\-j\fP / \fB\-\-bzip2\fP options are deprecated and will be removed in the future. For WAL compression, please make sure to enable it directly on the Barman server via the \fBcompression\fP configuration option. .UNINDENT .UNINDENT .SH Author EnterpriseDB .SH Copyright © Copyright EnterpriseDB UK Limited 2011-2026 .\" End of generated man page.