'\" t .\" Title: barman .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 08/13/2014 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "BARMAN" "1" "08/13/2014" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" barman \- Backup and Recovery Manager for PostgreSQL .SH "SYNOPSIS" .sp \fBbarman\fR [\fIOPTIONS\fR] {COMMAND} .SH "DESCRIPTION" .sp barman(1) is an administration tool for disaster recovery of PostgreSQL servers written in Python\&. barman can perform remote backups of multiple servers in business critical environments and helps DBAs during the recovery phase\&. .SH "OPTIONS" .PP \fB\-v, \-\-version\fR .RS 4 Show program version number and exit\&. .RE .PP \fB\-q, \-\-quiet\fR .RS 4 Do not output anything\&. Useful for cron scripts\&. .RE .PP \fB\-h, \-\-help\fR .RS 4 Show a help message and exit\&. .RE .PP \fB\-c CONFIG, \-\-config CONFIG\fR .RS 4 Use the specified configuration file\&. .RE .SH "WHERE COMMAND CAN BE:" .sp Important: every command has an help option .PP \fBcron\fR .RS 4 Perform maintenance tasks, such as moving incoming WAL files to the appropriate directory\&. .RE .PP \fBlist\-server\fR .RS 4 Show all the configured servers, and their descriptions\&. .RE .PP \fBshow\-server SERVERNAME\fR .RS 4 Show information about SERVERNAME, including: conninfo, backup_directory, wals_directory and many more\&. Specify all as SERVERNAME to show information about all the configured servers\&. .RE .PP \fBstatus SERVERNAME\fR .RS 4 Show information about the status of a server, including: number of available backups, archive_command, archive_status and many more\&. .sp .if n \{\ .RS 4 .\} .nf Example: Server main: description: PostgreSQL Example Database PostgreSQL version: 9\&.1\&.1 PostgreSQL Data directory: /var/lib/pgsql/9\&.1/data archive_command: rsync \-a %p barman@test\-backup\-server:/srv/barman/main/incoming/%f archive_status: last shipped WAL segment 0000000100000009000000ED current_xlog: 0000000100000009000000EF No\&. of available backups: 1 first/last available backup: 20120528T113358 .fi .if n \{\ .RE .\} .RE .PP \fBcheck SERVERNAME\fR .RS 4 Show diagnostic information about SERVERNAME, including: ssh connection check, PostgreSQL version, configuration and backup directories\&. Specify all as SERVERNAME to show diagnostic information about all the configured servers\&. .PP \fB\-\-nagios\fR .RS 4 Nagios plugin compatible output .RE .RE .PP \fBdiagnose\fR .RS 4 Collect diagnostic information about the server where barman is installed and all the configured servers, including: global configuration, SSH version, Python version, rsync version, as well as current configuration and status of all servers\&. .RE .PP \fBbackup SERVERNAME\fR .RS 4 Perform a backup of SERVERNAME using parameters specified in the configuration file\&. Specify all as SERVERNAME to perform a backup of all the configured servers\&. .PP \fB\-\-immediate\-checkpoint\fR .RS 4 forces the initial checkpoint to be done as quickly as possible\&. Overrides value of the parameter immediate_checkpoint, if present in the configuration file\&. .RE .PP \fB\-\-no\-immediate\-checkpoint\fR .RS 4 forces to wait for the checkpoint\&. Overrides value of the parameter immediate_checkpoint, if present in the configuration file\&. .RE .PP \fB\-\-retry\-times\fR .RS 4 Number of retries of data copy during base backup after an error\&. Overrides value of the parameter basebackup_retry_times, if present in the configuration file\&. .RE .PP \fB\-\-no\-retry\fR .RS 4 Same as \-\-retry\-times 0 .RE .PP \fB\-\-retry\-sleep\fR .RS 4 Number of seconds of wait after a failed copy, before retrying\&. Overrides value of the parameter basebackup_retry_sleep, if present in the configuration file\&. .RE .PP \fB\-\-no\-immediate\-checkpoint\fR .RS 4 Forces the number of retries of data copy to 0\&. Overrides value of the parameter basebackup_retry_times, if present in the configuration file\&. .RE .RE .PP \fBlist\-backup SERVERNAME\fR .RS 4 Show available backups for SERVERNAME\&. This command is useful to retrieve a backup ID\&. .RE .sp Example: servername 20111104T102647 \- Fri Nov 4 10:26:48 2011 \- Size: 17\&.0 MiB \- WAL Size: 100 B .sp .if n \{\ .RS 4 .\} .nf Here 20111104T102647 is the backup ID\&. .fi .if n \{\ .RE .\} .PP \fBshow\-backup SERVERNAME BACKUPID\fR .RS 4 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\&. .sp .if n \{\ .RS 4 .\} .nf Example: Backup 20111104T102647: Server Name : main PostgreSQL Version: 90101 PGDATA directory : /var/lib/pgsql/9\&.1/data .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf Base backup information: Disk usage : 17\&.0 MiB Timeline : 1 Begin WAL : 000000010000000000000002 End WAL : 000000010000000000000002 WAL number : 0 Begin time : 2011\-11\-04 10:26:47\&.357260 End time : 2011\-11\-04 10:26:48\&.888903 Begin Offset : 32 End Offset : 160 Begin XLOG : 0/2000020 End XLOG : 0/20000A0 .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf WAL information: No of files : 0 Disk usage : 0 B Last available : None .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf Catalog information: Previous Backup : \- (this is the oldest base backup) Next Backup : \- (this is the latest base backup) .fi .if n \{\ .RE .\} .RE .PP \fBlist\-files [OPTIONS] SERVERNAME BACKUPID\fR .RS 4 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\&. .PP \fB\-\-target TARGET_TYPE\fR .RS 4 Possible values for TARGET_TYPE are: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBdata\fR \- lists just the data files; .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBstandalone\fR \- lists the base backup files, including required WAL files; .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBwal\fR \- 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); .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBfull\fR \- same as data + wal\&. Defaults to standalone .RE .RE .RE .PP \fBrebuild\-xlogdb SERVERNAME\fR .RS 4 Perform a rebuild of the WAL file metadata for SERVERNAME (or every server, using the all shortcut) guessing it from the disk content\&. The metadata of the WAL archive is contained in the xlog\&.db file, and every Barman server has its own copy\&. .RE .PP \fBrecover [OPTIONS] SERVERNAME BACKUPID DESTINATIONDIRECTORY\fR .RS 4 Recover a backup in a given directory (local or remote, depending on the \-\-remote\-ssh\-command option settings)\&. See the "Backup ID shortcuts" section below for available shortcuts\&. .PP \fB\-\-target\-tli TARGET_TLI\fR .RS 4 Recover the specified timeline\&. .RE .PP \fB\-\-target\-time TARGET_TIME\fR .RS 4 Recover to the specified time\&. You can use any valid unambiguous representation\&. e\&.g: "YYYY\-MM\-DD HH:MM:SS\&.mmm"\&. .RE .PP \fB\-\-target\-xid TARGET_XID\fR .RS 4 Recover to the specified transaction ID\&. .RE .PP \fB\-\-target\-name TARGET_NAME\fR .RS 4 Recover to the named restore point previously created with the pg_create_restore_point(name) (for PostgreSQL 9\&.1 and above users)\&. .RE .PP \fB\-\-exclusive\fR .RS 4 Set target xid to be non inclusive\&. .RE .PP \fB\-\-tablespace NAME:LOCATION\fR .RS 4 Specify tablespace relocation rule\&. .RE .PP \fB\-\-remote\-ssh\-command SSH_COMMAND\fR .RS 4 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: \fIssh postgres@db2\fR\&. .RE .PP \fB\-\-retry\-times\fR .RS 4 Number of retries of data copy during base backup after an error\&. Overrides value of the parameter basebackup_retry_times, if present in the configuration file\&. .RE .PP \fB\-\-retry\-sleep\fR .RS 4 Number of seconds of wait after a failed copy, before retrying\&. Overrides value of the parameter basebackup_retry_sleep, if present in the configuration file\&. .RE .PP \fB\-\-no\-immediate\-checkpoint\fR .RS 4 Forces the number of retries of data copy to 0\&. Overrides value of the parameter basebackup_retry_times, if present in the configuration file\&. .RE .RE .PP \fBdelete SERVERNAME BACKUPID\fR .RS 4 Delete the specified backup\&. See the "Backup ID shortcuts" section below for available shortcuts\&. .RE .SH "BACKUP ID SHORTCUTS" .sp Rather than using the timestamp backup ID, you can use any of the following shortcuts/aliases to identity a backup for a given server: .PP \fBfirst\fR .RS 4 Oldest available backup for that server, in chronological order\&. .RE .PP \fBlast\fR .RS 4 Latest available backup for that server, in chronological order\&. .RE .PP \fBlatest\fR .RS 4 same ast \fBlast\fR\&. .RE .PP \fBoldest\fR .RS 4 same ast \fBfirst\fR\&. .RE .SH "EXIT STATUS" .PP \fB0\fR .RS 4 Success .RE .PP \fBNot zero\fR .RS 4 Failure .RE .SH "BUGS" .sp Barman has been extensively tested, and is currently being used in several production environments\&. However, we cannot exclude the presence of bugs\&. .sp Any bug can be reported via the Sourceforge bug tracker\&. Along the bug submission, users can provide developers with diagnostics information obtained through the barman diagnose command\&. .SH "AUTHORS" .sp In alphabetical order: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Gabriele Bartolini (core team, project leader) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Giuseppe Broccolo (core team, QA/testing) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Giulio Calacoci (core team, developer) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Francesco Canovai (core team, QA/testing) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Marco Nenciarini (core team, team leader) .RE .sp Past contributors: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Carlo Ascani .RE .SH "RESOURCES" .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Homepage: http://www\&.pgbarman\&.org/ .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Documentation: http://docs\&.pgbarman\&.org/ .RE .SH "COPYING" .sp Barman is the exclusive property of 2ndQuadrant Italia and its code is distributed under GNU General Public License v3\&. .sp Copyright \(co 2011\-2014 2ndQuadrant Italia (Devise\&.IT S\&.r\&.l\&.) \- http://www\&.2ndQuadrant\&.it/\&.