.\" Automatically generated by Pandoc 2.2.1 .\" .TH "BARMAN" "1" "January 24, 2024" "Barman User manuals" "Version 3.10.0" .hy .SH NAME .PP barman \- Backup and Recovery Manager for PostgreSQL .SH SYNOPSIS .PP barman [\f[I]OPTIONS\f[]] \f[I]COMMAND\f[] .SH DESCRIPTION .PP Barman is an administration tool for disaster recovery of PostgreSQL servers written in Python and maintained by EnterpriseDB. Barman can perform remote backups of multiple servers in business critical environments and helps DBAs during the recovery phase. .SH OPTIONS .TP .B \-h, \-\-help Show a help message and exit. .RS .RE .TP .B \-v, \-\-version Show program version number and exit. .RS .RE .TP .B \-c \f[I]CONFIG\f[], \-\-config \f[I]CONFIG\f[] Use the specified configuration file. .RS .RE .TP .B \-\-color \f[I]{never,always,auto}\f[], \-\-colour \f[I]{never,always,auto}\f[] Whether to use colors in the output (default: \f[I]auto\f[]) .RS .RE .TP .B \-q, \-\-quiet Do not output anything. Useful for cron scripts. .RS .RE .TP .B \-d, \-\-debug debug output (default: False) .RS .RE .TP .B \-\-log\-level {NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL} Override the default log level .RS .RE .TP .B \-f {json,console}, \-\-format {json,console} output format (default: \[aq]console\[aq]) .RS .RE .SH COMMANDS .PP Important: every command has a help option .TP .B archive\-wal \f[I]SERVER_NAME\f[] Get any incoming xlog file (both through standard \f[C]archive_command\f[] and streaming replication, where applicable) and moves them in the WAL archive for that server. If necessary, apply compression when requested by the user. .RS .RE .TP .B backup \f[I]SERVER_NAME\f[] Perform a backup of \f[C]SERVER_NAME\f[] using parameters specified in the configuration file. Specify \f[C]all\f[] as \f[C]SERVER_NAME\f[] to perform a backup of all the configured servers. You can also specify \f[C]SERVER_NAME\f[] multiple times to perform a backup of the specified servers \-\- e.g. \f[C]barman\ backup\ SERVER_1_NAME\ SERVER_2_NAME\f[]. .RS .TP .B \-\-name a friendly name for this backup which can be used in place of the backup ID in barman commands. .RS .RE .TP .B \-\-immediate\-checkpoint forces the initial checkpoint to be done as quickly as possible. Overrides value of the parameter \f[C]immediate_checkpoint\f[], if present in the configuration file. .RS .RE .TP .B \-\-no\-immediate\-checkpoint forces to wait for the checkpoint. Overrides value of the parameter \f[C]immediate_checkpoint\f[], if present in the configuration file. .RS .RE .TP .B \-\-reuse\-backup [INCREMENTAL_TYPE] Overrides \f[C]reuse_backup\f[] option behaviour. Possible values for \f[C]INCREMENTAL_TYPE\f[] are: .RS .IP \[bu] 2 \f[I]off\f[]: do not reuse the last available backup; .IP \[bu] 2 \f[I]copy\f[]: reuse the last available backup for a server and create a copy of the unchanged files (reduce backup time); .IP \[bu] 2 \f[I]link\f[]: reuse the last available backup for a server and create a hard link of the unchanged files (reduce backup time and space); .PP \f[C]link\f[] is the default target if \f[C]\-\-reuse\-backup\f[] is used and \f[C]INCREMENTAL_TYPE\f[] is not explicit. .RE .TP .B \-\-retry\-times Number of retries of base backup copy, after an error. Used during both backup and recovery operations. Overrides value of the parameter \f[C]basebackup_retry_times\f[], if present in the configuration file. .RS .RE .TP .B \-\-no\-retry Same as \f[C]\-\-retry\-times\ 0\f[] .RS .RE .TP .B \-\-retry\-sleep Number of seconds of wait after a failed copy, before retrying. Used during both backup and recovery operations. Overrides value of the parameter \f[C]basebackup_retry_sleep\f[], if present in the configuration file. .RS .RE .TP .B \-j, \-\-jobs Number of parallel workers to copy files during backup. Overrides value of the parameter \f[C]parallel_jobs\f[], if present in the configuration file. .RS .RE .TP .B \-\-jobs\-start\-batch\-period The time period in seconds over which a single batch of jobs will be started. Overrides the value of \f[C]parallel_jobs_start_batch_period\f[], if present in the configuration file. Defaults to 1 second. .RS .RE .TP .B \-\-jobs\-start\-batch\-size Maximum number of parallel workers to start in a single batch. Overrides the value of \f[C]parallel_jobs_start_batch_size\f[], if present in the configuration file. Defaults to 10 jobs. .RS .RE .TP .B \-\-bwlimit KBPS maximum transfer rate in kilobytes per second. A value of 0 means no limit. Overrides \[aq]bandwidth_limit\[aq] configuration option. Default is undefined. .RS .RE .TP .B \-\-wait, \-w wait for all required WAL files by the base backup to be archived .RS .RE .TP .B \-\-wait\-timeout the time, in seconds, spent waiting for the required WAL files to be archived before timing out .RS .RE .TP .B \-\-manifest forces the creation of a backup manifest file at the end of a backup. Overrides value of the parameter \f[C]autogenerate_manifest\f[], from the configuration file. Works with rsync backup method and strategies only .RS .RE .TP .B \-\-no\-manifest disables the automatic creation of a backup manifest file at the end of a backup. Overrides value of the parameter \f[C]autogenerate_manifest\f[], from the configuration file. Works with rsync backup method and strategies only .RS .RE .RE .TP .B check\-backup \f[I]SERVER_NAME\f[] \f[I]BACKUP_ID\f[] Make sure that all the required WAL files to check the consistency of a physical backup (that is, from the beginning to the end of the full backup) are correctly archived. This command is automatically invoked by the \f[C]cron\f[] command and at the end of every backup operation. .RS .RE .TP .B check\-wal\-archive \f[I]SERVER_NAME\f[] Check that the WAL archive destination for \f[I]SERVER_NAME\f[] is safe to use for a new PostgreSQL cluster. With no optional args (the default) this will pass if the WAL archive is empty and fail otherwise. .RS .TP .B \-\-timeline [TIMELINE] A positive integer specifying the earliest timeline for which associated WALs should cause the check to fail. The check will pass if all WAL content in the archive relates to earlier timelines. If any WAL files are on this timeline or greater then the check will fail. .RS .RE .RE .TP .B check \f[I]SERVER_NAME\f[] Show diagnostic information about \f[C]SERVER_NAME\f[], including: Ssh connection check, PostgreSQL version, configuration and backup directories, archiving process, streaming process, replication slots, etc. Specify \f[C]all\f[] as \f[C]SERVER_NAME\f[] to show diagnostic information about all the configured servers. .RS .TP .B \-\-nagios Nagios plugin compatible output .RS .RE .RE .TP .B config\-switch \f[I]SERVER_NAME\f[] \f[I]MODEL_NAME\f[] Apply a set of configuration overrides defined in the model \f[C]MODEL_NAME\f[] to the Barman server \f[C]SERVER_NAME\f[]. The final configuration is composed of the server configuration plus the overrides defined in the given model. Note: there can only be at most one model active at a time for a given server. config\-update \f[I]JSON_CHANGES\f[] .RS .RE Create or update configuration of servers and/or models in Barman. \f[C]JSON_CHANGES\f[] should be a JSON string containing an array of documents. Each document must contain the \f[C]scope\f[] key, which can be either \f[C]server\f[] or \f[C]model\f[], and either the \f[C]server_name\f[] or \f[C]model_name\f[] key, depending on the value of \f[C]scope\f[]. Besides that, other keys are expected to be Barman configuration options along with their desired values. .RS .RE .TP .B cron Perform maintenance tasks, such as enforcing retention policies or WAL files management. .RS .TP .B \-\-keep\-descriptors Keep the stdout and the stderr streams of the Barman subprocesses attached to this one. This is useful for Docker based installations. .RS .RE .RE .TP .B delete \f[I]SERVER_NAME\f[] \f[I]BACKUP_ID\f[] Delete the specified backup. Backup ID shortcuts section below for available shortcuts. .RS .RE .TP .B diagnose Collect diagnostic information about the server where barman is installed and all the configured servers, including: global configuration, SSH version, Python version, \f[C]rsync\f[] version, as well as current configuration and status of all servers. .RS .RE .TP .B generate\-manifest \f[I]SERVER_NAME\f[] \f[I]BACKUP_ID\f[] Generates a backup_manifest file for a backup_id. .RS .RE .TP .B get\-wal \f[I][OPTIONS]\f[] \f[I]SERVER_NAME\f[] \f[I]WAL_NAME\f[] Retrieve a WAL file from the \f[C]xlog\f[] archive of a given server. By default, the requested WAL file, if found, is returned as uncompressed content to \f[C]STDOUT\f[]. The following options allow users to change this behaviour: .RS .TP .B \-o \f[I]OUTPUT_DIRECTORY\f[] destination directory where the \f[C]get\-wal\f[] will deposit the requested WAL .RS .RE .TP .B \-P, \-\-partial retrieve also partial WAL files (.partial) .RS .RE .TP .B \-z output will be compressed using gzip .RS .RE .TP .B \-j output will be compressed using bzip2 .RS .RE .TP .B \-p \f[I]SIZE\f[] peek from the WAL archive up to \f[I]SIZE\f[] WAL files, starting from the requested one. \[aq]SIZE\[aq] must be an integer >= 1. When invoked with this option, get\-wal returns a list of zero to \[aq]SIZE\[aq] WAL segment names, one per row. .RS .RE .TP .B \-t, \-\-test test both the connection and the configuration of the requested PostgreSQL server in Barman for WAL retrieval. With this option, the \[aq]WAL_NAME\[aq] mandatory argument is ignored. .RS .RE .RE .TP .B keep \f[I]SERVER_NAME\f[] \f[I]BACKUP_ID\f[] Flag the specified backup as an archival backup which should be kept forever, regardless of any retention policies in effect. See the Backup ID shortcuts section below for available shortcuts. .RS .TP .B \-\-target \f[I]RECOVERY_TARGET\f[] Specify the recovery target for the archival backup. Possible values for \f[I]RECOVERY_TARGET\f[] are: .RS .IP \[bu] 2 \f[I]full\f[]: The backup can always be used to recover to the latest point in time. To achieve this, Barman will retain all WALs needed to ensure consistency of the backup and all subsequent WALs. .IP \[bu] 2 \f[I]standalone\f[]: The backup can only be used to recover the server to its state at the time the backup was taken. Barman will only retain the WALs needed to ensure consistency of the backup. .RE .TP .B \-\-status Report the archival status of the backup. This will either be the recovery target of \f[I]full\f[] or \f[I]standalone\f[] for archival backups or \f[I]nokeep\f[] for backups which have not been flagged as archival. .RS .RE .TP .B \-\-release Release the keep flag from this backup. This will remove its archival status and make it available for deletion, either directly or by retention policy. .RS .RE .RE .TP .B list\-backups \f[I]SERVER_NAME\f[] Show available backups for \f[C]SERVER_NAME\f[]. This command is useful to retrieve a backup ID. For example: .RS .RE .IP .nf \f[C] servername\ 20111104T102647\ \-\ Fri\ Nov\ \ 4\ 10:26:48\ 2011\ \-\ Size:\ 17.0\ MiB\ \-\ WAL\ Size:\ 100\ B \f[] .fi .IP .nf \f[C] In\ this\ case,\ *20111104T102647*\ is\ the\ backup\ ID. \f[] .fi .TP .B list\-files \f[I][OPTIONS]\f[] \f[I]SERVER_NAME\f[] \f[I]BACKUP_ID\f[] List all the files in a particular backup, identified by the server name and the backup ID. See the Backup ID shortcuts section below for available shortcuts. .RS .TP .B \-\-target \f[I]TARGET_TYPE\f[] Possible values for TARGET_TYPE are: .RS .IP \[bu] 2 \f[I]data\f[]: lists just the data files; .IP \[bu] 2 \f[I]standalone\f[]: lists the base backup files, including required WAL files; .IP \[bu] 2 \f[I]wal\f[]: lists all the WAL files between the start of the base backup and the end of the log / the start of the following base backup (depending on whether the specified base backup is the most recent one available); .IP \[bu] 2 \f[I]full\f[]: same as data + wal. .PP The default value is \f[C]standalone\f[]. .RE .RE .TP .B list\-servers Show all the configured servers, and their descriptions. .RS .RE .TP .B lock\-directory\-cleanup Automatically cleans up the barman_lock_directory from unused lock files. .RS .RE .TP .B put\-wal \f[I][OPTIONS]\f[] \f[I]SERVER_NAME\f[] Receive a WAL file from a remote server and securely store it into the \f[C]SERVER_NAME\f[] incoming directory. The WAL file is retrieved from the \f[C]STDIN\f[], and must be encapsulated in a tar stream together with a \f[C]MD5SUMS\f[] file to validate it. This command is meant to be invoked through SSH from a remote \f[C]barman\-wal\-archive\f[] utility (part of \f[C]barman\-cli\f[] package). Do not use this command directly unless you take full responsibility of the content of files. .RS .TP .B \-t, \-\-test test both the connection and the configuration of the requested PostgreSQL server in Barman to make sure it is ready to receive WAL files. .RS .RE .RE .TP .B rebuild\-xlogdb \f[I]SERVER_NAME\f[] Perform a rebuild of the WAL file metadata for \f[C]SERVER_NAME\f[] (or every server, using the \f[C]all\f[] shortcut) guessing it from the disk content. The metadata of the WAL archive is contained in the \f[C]xlog.db\f[] file, and every Barman server has its own copy. .RS .RE .TP .B receive\-wal \f[I]SERVER_NAME\f[] Start the stream of transaction logs for a server. The process relies on \f[C]pg_receivewal\f[]/\f[C]pg_receivexlog\f[] to receive WAL files from the PostgreSQL servers through the streaming protocol. .RS .TP .B \-\-stop stop the receive\-wal process for the server .RS .RE .TP .B \-\-reset reset the status of receive\-wal, restarting the streaming from the current WAL file of the server .RS .RE .TP .B \-\-create\-slot create the physical replication slot configured with the \f[C]slot_name\f[] configuration parameter .RS .RE .TP .B \-\-drop\-slot drop the physical replication slot configured with the \f[C]slot_name\f[] configuration parameter .RS .RE .RE .TP .B recover \f[I][OPTIONS]\f[] \f[I]SERVER_NAME\f[] \f[I]BACKUP_ID\f[] \f[I]DESTINATION_DIRECTORY\f[] Recover a backup in a given directory (local or remote, depending on the \f[C]\-\-remote\-ssh\-command\f[] option settings). See the Backup ID shortcuts section below for available shortcuts. .RS .TP .B \-\-target\-tli \f[I]TARGET_TLI\f[] Recover the specified timeline. The special values \f[C]current\f[] and \f[C]latest\f[] can be used in addition to a numeric timeline ID. The default behaviour for PostgreSQL versions >= 12 is to recover to the \f[C]latest\f[] timeline in the WAL archive. The default for PostgreSQL versions < 12 is to recover along the timeline which was current when the backup was taken. .RS .RE .TP .B \-\-target\-time \f[I]TARGET_TIME\f[] Recover to the specified time. .RS .PP You can use any valid unambiguous representation (e.g: "YYYY\-MM\-DD HH:MM:SS.mmm"). .RE .TP .B \-\-target\-xid \f[I]TARGET_XID\f[] Recover to the specified transaction ID. .RS .RE .TP .B \-\-target\-lsn \f[I]TARGET_LSN\f[] Recover to the specified LSN (Log Sequence Number). Requires PostgreSQL 10 or above. .RS .RE .TP .B \-\-target\-name \f[I]TARGET_NAME\f[] Recover to the named restore point previously created with the \f[C]pg_create_restore_point(name)\f[]. .RS .RE .TP .B \-\-target\-immediate Recover ends when a consistent state is reached (end of the base backup) .RS .RE .TP .B \-\-exclusive Set target (time, XID or LSN) to be non inclusive. .RS .RE .TP .B \-\-target\-action \f[I]ACTION\f[] Trigger the specified action once the recovery target is reached. Possible actions are: \f[C]pause\f[], \f[C]shutdown\f[] and \f[C]promote\f[]. This option requires a target to be defined, with one of the above options. .RS .RE .TP .B \-\-tablespace \f[I]NAME:LOCATION\f[] Specify tablespace relocation rule. .RS .RE .TP .B \-\-remote\-ssh\-command \f[I]SSH_COMMAND\f[] This options activates remote recovery, by specifying the secure shell command to be launched on a remote host. This is the equivalent of the "ssh_command" server option in the configuration file for remote recovery. Example: \[aq]ssh postgres\@db2\[aq]. .RS .RE .TP .B \-\-retry\-times \f[I]RETRY_TIMES\f[] Number of retries of data copy during base backup after an error. Overrides value of the parameter \f[C]basebackup_retry_times\f[], if present in the configuration file. .RS .RE .TP .B \-\-no\-retry Same as \f[C]\-\-retry\-times\ 0\f[] .RS .RE .TP .B \-\-retry\-sleep Number of seconds of wait after a failed copy, before retrying. Overrides value of the parameter \f[C]basebackup_retry_sleep\f[], if present in the configuration file. .RS .RE .TP .B \-\-bwlimit KBPS maximum transfer rate in kilobytes per second. A value of 0 means no limit. Overrides \[aq]bandwidth_limit\[aq] configuration option. Default is undefined. .RS .RE .TP .B \-j , \-\-jobs Number of parallel workers to copy files during recovery. Overrides value of the parameter \f[C]parallel_jobs\f[], if present in the configuration file. Works only for servers configured through \f[C]rsync\f[]/SSH. .RS .RE .TP .B \-\-jobs\-start\-batch\-period The time period in seconds over which a single batch of jobs will be started. Overrides the value of \f[C]parallel_jobs_start_batch_period\f[], if present in the configuration file. Defaults to 1 second. .RS .RE .TP .B \-\-jobs\-start\-batch\-size Maximum number of parallel workers to start in a single batch. Overrides the value of \f[C]parallel_jobs_start_batch_size\f[], if present in the configuration file. Defaults to 10 jobs. .RS .RE .TP .B \-\-get\-wal, \-\-no\-get\-wal Enable/Disable usage of \f[C]get\-wal\f[] for WAL fetching during recovery. Default is based on \f[C]recovery_options\f[] setting. .RS .RE .TP .B \-\-network\-compression, \-\-no\-network\-compression Enable/Disable network compression during remote recovery. Default is based on \f[C]network_compression\f[] configuration setting. .RS .RE .TP .B \-\-standby\-mode Specifies whether to start the PostgreSQL server as a standby. Default is undefined. .RS .RE .TP .B \-\-recovery\-staging\-path \f[I]STAGING_PATH\f[] A path to a location on the recovery host (either the barman server or a remote host if \-\-remote\-ssh\-command is also used) where files for a compressed backup will be staged before being uncompressed to the destination directory. Backups will be staged in their own directory within the staging path according to the following naming convention: "barman\-staging\-SERVER_NAME\-BACKUP_ID". The staging directory within the staging path will be removed at the end of the recovery process. This option is \f[I]required\f[] when recovering from compressed backups and has no effect otherwise. .RS .RE .TP .B \-\-recovery\-conf\-filename \f[I]RECOVERY_CONF_FILENAME\f[] The name of the file where Barman should write the PostgreSQL recovery options when recovering backups for PostgreSQL versions 12 and later. This defaults to postgresql.auto.conf however if \-\-recovery\-conf\-filename is used then recovery options will be written to RECOVERY_CONF_FILENAME instead. The default value is correct for a typical PostgreSQL installation however if PostgreSQL is being managed by tooling which modifies the configuration mechanism (for example postgresql.auto.conf could be symlinked to /dev/null) then this option can be used to write the recovery options to an alternative location. .RS .RE .TP .B \-\-snapshot\-recovery\-instance \f[I]INSTANCE_NAME\f[] Name of the instance where the disks recovered from the snapshots are attached. This option is required when recovering backups made with \f[C]backup_method\ =\ snapshot\f[]. .RS .RE .TP .B \-\-gcp\-zone \f[I]ZONE_NAME\f[] Name of the GCP zone where the instance and disks for snapshot recovery are located. This option can be used to override the value of \f[C]gcp_zone\f[] in the Barman config. .RS .RE .TP .B \-\-azure\-resource\-group \f[I]RESOURCE_GROUP_NAME\f[] Name of the Azure resource group containing the instance and disks for snapshot recovery. This option can be used to override the value of \f[C]azure_resource_group\f[] in the Barman config. .RS .RE .TP .B \-\-aws\-region \f[I]REGION_NAME\f[] Name of the AWS region where the instance and disks for snapshot recovery are located. This option can be used to override the value of \f[C]aws_region\f[] in the Barman config. .RS .RE .RE .TP .B replication\-status \f[I][OPTIONS]\f[] \f[I]SERVER_NAME\f[] Shows live information and status of any streaming client attached to the given server (or servers). Default behaviour can be changed through the following options: .RS .TP .B \-\-minimal machine readable output (default: False) .RS .RE .TP .B \-\-target \f[I]TARGET_TYPE\f[] Possible values for TARGET_TYPE are: .RS .IP \[bu] 2 \f[I]hot\-standby\f[]: lists only hot standby servers .IP \[bu] 2 \f[I]wal\-streamer\f[]: lists only WAL streaming clients, such as pg_receivewal .IP \[bu] 2 \f[I]all\f[]: any streaming client (default) .RE .TP .B \-\-source \f[I]SOURCE_TYPE\f[] Possible values for SOURCE_TYPE are: .RS .IP \[bu] 2 \f[I]backup\-host\f[]: list clients using the backup conninfo for a server (default) .IP \[bu] 2 \f[I]wal\-host\f[]: list clients using the WAL streaming conninfo for a server .RE .RE .TP .B show\-backup \f[I]SERVER_NAME\f[] \f[I]BACKUP_ID\f[] Show detailed information about a particular backup, identified by the server name and the backup ID. See the Backup ID shortcuts section below for available shortcuts. For example: .RS .RE .IP .nf \f[C] Backup\ 20150828T130001: \ \ Server\ Name\ \ \ \ \ \ \ \ \ \ \ \ :\ quagmire \ \ Status\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ :\ DONE \ \ PostgreSQL\ Version\ \ \ \ \ :\ 90402 \ \ PGDATA\ directory\ \ \ \ \ \ \ :\ /srv/postgresql/9.4/main/data \ \ Base\ backup\ information: \ \ \ \ Disk\ usage\ \ \ \ \ \ \ \ \ \ \ :\ 12.4\ TiB\ (12.4\ TiB\ with\ WALs) \ \ \ \ Incremental\ size\ \ \ \ \ :\ 4.9\ TiB\ (\-60.02%) \ \ \ \ Timeline\ \ \ \ \ \ \ \ \ \ \ \ \ :\ 1 \ \ \ \ Begin\ WAL\ \ \ \ \ \ \ \ \ \ \ \ :\ 0000000100000CFD000000AD \ \ \ \ End\ WAL\ \ \ \ \ \ \ \ \ \ \ \ \ \ :\ 0000000100000D0D00000008 \ \ \ \ WAL\ number\ \ \ \ \ \ \ \ \ \ \ :\ 3932 \ \ \ \ WAL\ compression\ ratio:\ 79.51% \ \ \ \ Begin\ time\ \ \ \ \ \ \ \ \ \ \ :\ 2015\-08\-28\ 13:00:01.633925+00:00 \ \ \ \ End\ time\ \ \ \ \ \ \ \ \ \ \ \ \ :\ 2015\-08\-29\ 10:27:06.522846+00:00 \ \ \ \ Begin\ Offset\ \ \ \ \ \ \ \ \ :\ 1575048 \ \ \ \ End\ Offset\ \ \ \ \ \ \ \ \ \ \ :\ 13853016 \ \ \ \ Begin\ XLOG\ \ \ \ \ \ \ \ \ \ \ :\ CFD/AD180888 \ \ \ \ End\ XLOG\ \ \ \ \ \ \ \ \ \ \ \ \ :\ D0D/8D36158 \ \ WAL\ information: \ \ \ \ No\ of\ files\ \ \ \ \ \ \ \ \ \ :\ 35039 \ \ \ \ Disk\ usage\ \ \ \ \ \ \ \ \ \ \ :\ 121.5\ GiB \ \ \ \ WAL\ rate\ \ \ \ \ \ \ \ \ \ \ \ \ :\ 275.50/hour \ \ \ \ Compression\ ratio\ \ \ \ :\ 77.81% \ \ \ \ Last\ available\ \ \ \ \ \ \ :\ 0000000100000D95000000E7 \ \ Catalog\ information: \ \ \ \ Retention\ Policy\ \ \ \ \ :\ not\ enforced \ \ \ \ Previous\ Backup\ \ \ \ \ \ :\ 20150821T130001 \ \ \ \ Next\ Backup\ \ \ \ \ \ \ \ \ \ :\ \-\ (this\ is\ the\ latest\ base\ backup) \f[] .fi .TP .B show\-servers \f[I]SERVER_NAME\f[] Show information about \f[C]SERVER_NAME\f[], including: \f[C]conninfo\f[], \f[C]backup_directory\f[], \f[C]wals_directory\f[] and many more. Specify \f[C]all\f[] as \f[C]SERVER_NAME\f[] to show information about all the configured servers. .RS .RE .TP .B status \f[I]SERVER_NAME\f[] Show information about the status of a server, including: number of available backups, \f[C]archive_command\f[], \f[C]archive_status\f[] and many more. For example: .RS .RE .IP .nf \f[C] Server\ quagmire: \ \ Description:\ The\ Giggity\ database \ \ Passive\ node:\ False \ \ PostgreSQL\ version:\ 9.3.9 \ \ PostgreSQL\ Data\ directory:\ /srv/postgresql/9.3/data \ \ PostgreSQL\ \[aq]archive_command\[aq]\ setting:\ rsync\ \-a\ %p\ barman\@backup:/var/lib/barman/quagmire/incoming \ \ Last\ archived\ WAL:\ 0000000100003103000000AD \ \ Current\ WAL\ segment:\ 0000000100003103000000AE \ \ Retention\ policies:\ enforced\ (mode:\ auto,\ retention:\ REDUNDANCY\ 2,\ WAL\ retention:\ MAIN) \ \ No.\ of\ available\ backups:\ 2 \ \ First\ available\ backup:\ 20150908T003001 \ \ Last\ available\ backup:\ 20150909T003001 \ \ Minimum\ redundancy\ requirements:\ satisfied\ (2/1) \f[] .fi .TP .B switch\-wal \f[I]SERVER_NAME\f[] Execute pg_switch_wal() on the target server (from PostgreSQL 10), or pg_switch_xlog (for PostgreSQL 8.3 to 9.6). .RS .TP .B \-\-force Forces the switch by executing CHECKPOINT before pg_switch_xlog(). \f[I]IMPORTANT:\f[] executing a CHECKPOINT might increase I/O load on a PostgreSQL server. Use this option with care. .RS .RE .TP .B \-\-archive Wait for one xlog file to be archived. If after a defined amount of time (default: 30 seconds) no xlog file is archived, Barman will terminate with failure exit code. Available also on standby servers. .RS .RE .TP .B \-\-archive\-timeout \f[I]TIMEOUT\f[] Specifies the amount of time in seconds (default: 30 seconds) the archiver will wait for a new xlog file to be archived before timing out. Available also on standby servers. .RS .RE .RE .TP .B switch\-xlog \f[I]SERVER_NAME\f[] Alias for switch\-wal (kept for back\-compatibility) .RS .RE .TP .B sync\-backup \f[I]SERVER_NAME\f[] \f[I]BACKUP_ID\f[] Command used for the synchronisation of a passive node with its primary. Executes a copy of all the files of a \f[C]BACKUP_ID\f[] that is present on \f[C]SERVER_NAME\f[] node. This command is available only for passive nodes, and uses the \f[C]primary_ssh_command\f[] option to establish a secure connection with the primary node. .RS .RE .TP .B sync\-info \f[I]SERVER_NAME\f[] [\f[I]LAST_WAL\f[] [\f[I]LAST_POSITION\f[]]] Collect information regarding the current status of a Barman server, to be used for synchronisation purposes. Returns a JSON output representing \f[C]SERVER_NAME\f[], that contains: all the successfully finished backup, all the archived WAL files, the configuration, last WAL file been read from the \f[C]xlog.db\f[] and the position in the file. .RS .TP .B LAST_WAL tells sync\-info to skip any WAL file previous to that (incremental synchronisation) .RS .RE .TP .B LAST_POSITION hint for quickly positioning in the \f[C]xlog.db\f[] file (incremental synchronisation) .RS .RE .RE .TP .B sync\-wals \f[I]SERVER_NAME\f[] Command used for the synchronisation of a passive node with its primary. Executes a copy of all the archived WAL files that are present on \f[C]SERVER_NAME\f[] node. This command is available only for passive nodes, and uses the \f[C]primary_ssh_command\f[] option to establish a secure connection with the primary node. .RS .RE .TP .B verify\-backup \f[I]SERVER_NAME\f[] \f[I]BACKUP_ID\f[] Executes \f[C]pg_verifybackup\f[] against a backup manifest file (available since Postgres 13). For rsync backups, it can be used with generate\-manifest command. Requires \f[C]pg_verifybackup\f[] installed on the backup server .RS .RE .TP .B verify \f[I]SERVER_NAME\f[] \f[I]BACKUP_ID\f[] Alias for verify\-backup .RS .RE .SH BACKUP ID SHORTCUTS .PP Rather than using the timestamp backup ID, you can use any of the following shortcuts/aliases to identity a backup for a given server: .TP .B first Oldest available backup for that server, in chronological order. .RS .RE .TP .B last Latest available backup for that server, in chronological order. .RS .RE .TP .B latest same ast \f[I]last\f[]. .RS .RE .TP .B oldest same ast \f[I]first\f[]. .RS .RE .TP .B last\-failed Latest failed backup, in chronological order. .RS .RE .SH EXIT STATUS .TP .B 0 Success .RS .RE .TP .B Not zero Failure .RS .RE .SH SEE ALSO .PP \f[C]barman\f[] (5). .SH BUGS .PP Barman has been extensively tested, and is currently being used in several production environments. However, we cannot exclude the presence of bugs. .PP Any bug can be reported via the GitHub bug tracker. Along with the bug submission, users can provide developers with diagnostics information obtained through the \f[C]barman\ diagnose\f[] command. .SH AUTHORS .PP Barman maintainers (in alphabetical order): .IP \[bu] 2 Abhijit Menon\-Sen .IP \[bu] 2 Didier Michel .IP \[bu] 2 Michael Wallace .PP Past contributors (in alphabetical order): .IP \[bu] 2 Anna Bellandi (QA/testing) .IP \[bu] 2 Britt Cole (documentation reviewer) .IP \[bu] 2 Carlo Ascani (developer) .IP \[bu] 2 Francesco Canovai (QA/testing) .IP \[bu] 2 Gabriele Bartolini (architect) .IP \[bu] 2 Gianni Ciolli (QA/testing) .IP \[bu] 2 Giulio Calacoci (developer) .IP \[bu] 2 Giuseppe Broccolo (developer) .IP \[bu] 2 Jane Threefoot (developer) .IP \[bu] 2 Jonathan Battiato (QA/testing) .IP \[bu] 2 Leonardo Cecchi (developer) .IP \[bu] 2 Marco Nenciarini (project leader) .IP \[bu] 2 Niccolò Fei (QA/testing) .IP \[bu] 2 Rubens Souza (QA/testing) .IP \[bu] 2 Stefano Bianucci (developer) .SH RESOURCES .IP \[bu] 2 Homepage: .IP \[bu] 2 Documentation: .IP \[bu] 2 Professional support: .SH COPYING .PP Barman is the property of EnterpriseDB UK Limited and its code is distributed under GNU General Public License v3. .PP © Copyright EnterpriseDB UK Limited 2011\-2023 .SH AUTHORS EnterpriseDB .