GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  BARMAN (1)

NAME

barman - Backup and Recovery Manager for PostgreSQL

CONTENTS

Synopsis
Description
Options
Commands
Backup Id Shortcuts
Exit Status
See Also
Bugs
Authors
Resources
Copying
Authors

SYNOPSIS

barman [I]OPTIONS]] I]COMMAND]

DESCRIPTION

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

OPTIONS

-v, --version
  Show program version number and exit.
-q, --quiet
  Do not output anything. Useful for cron scripts.
-h, --help Show a help message and exit.
-c I]CONFIG], --config I]CONFIG]
  Use the specified configuration file.

COMMANDS

Important: every command has a help option
archive-wal I]SERVER_NAME]
  Get any incoming xlog file (both through standard C]archive_command] and streaming replication, where applicable) and moves them in the WAL archive for that server. If necessary, apply compression when requested by the user.
cron Perform maintenance tasks, such as enforcing retention policies or WAL files management.
list-server
  Show all the configured servers, and their descriptions.
show-server I]SERVER_NAME]
  Show information about C]SERVER_NAME], including: C]conninfo], C]backup_directory], C]wals_directory] and many more. Specify C]all] as C]SERVER_NAME] to show information about all the configured servers.
status I]SERVER_NAME]
  Show information about the status of a server, including: number of available backups, C]archive_command], C]archive_status] and many more. For example:
C]
Server quagmire:
  Description: The Giggity database
  Passive node: False
  PostgreSQL version: 9.3.9
  pgespresso extension: Not available
  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)
]

check I]SERVER_NAME]
  Show diagnostic information about C]SERVER_NAME], including: ssh connection check, PostgreSQL version, configuration and backup directories. Specify C]all] as C]SERVER_NAME] to show diagnostic information about all the configured servers.
--nagios
  Nagios plugin compatible output
diagnose
  Collect diagnostic information about the server where barman is installed and all the configured servers, including: global configuration, SSH version, Python version, C]rsync] version, as well as current configuration and status of all servers.
backup I]SERVER_NAME]
  Perform a backup of C]SERVER_NAME] using parameters specified in the configuration file. Specify C]all] as C]SERVER_NAME] to perform a backup of all the configured servers.
--immediate-checkpoint
  forces the initial checkpoint to be done as quickly as possible. Overrides value of the parameter C]immediate_checkpoint], if present in the configuration file.
--no-immediate-checkpoint
  forces to wait for the checkpoint. Overrides value of the parameter C]immediate_checkpoint], if present in the configuration file.
--reuse-backup [INCREMENTAL_TYPE]
  Overrides C]reuse_backup] option behaviour. Possible values for C]INCREMENTAL_TYPE] are:
[bu] I]off]: do not reuse the last available backup;
[bu] I]copy]: reuse the last available backup for a server and create a copy of the unchanged files (reduce backup time);
[bu] I]link]: reuse the last available backup for a server and create a hard link of the unchanged files (reduce backup time and space);
C]link] is the default target if C]--reuse-backup] is used and C]INCREMENTAL_TYPE] is not explicited.
--retry-times
  Number of retries of base backup copy, after an error. Used during both backup and recovery operations. Overrides value of the parameter C]basebackup_retry_times], if present in the configuration file.
--no-retry
  Same as C]--retry-times 0]
--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 C]basebackup_retry_sleep], if present in the configuration file.
list-backup I]SERVER_NAME]
  Show available backups for C]SERVER_NAME]. This command is useful to retrieve a backup ID. For example:
C]
servername 20111104T102647 - Fri Nov  4 10:26:48 2011 - Size: 17.0 MiB - WAL Size: 100 B
]

C]
In this case, *20111104T102647* is the backup ID.
]

show-backup I]SERVER_NAME] I]BACKUP_ID]
  Show detailed information about a particular backup, identified by the server name and the backup ID. See the Backup ID shortcuts (#shortcuts) section below for available shortcuts. For example:
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) ]

list-files I][OPTIONS]] I]SERVER_NAME] I]BACKUP_ID]
  List all the files in a particular backup, identified by the server name and the backup ID. See the Backup ID shortcuts (#shortcuts) section below for available shortcuts.
--target I]TARGET_TYPE]
  Possible values for TARGET_TYPE are:
[bu] I]data]: lists just the data files;
[bu] I]standalone]: lists the base backup files, including required WAL files;
[bu] I]wal]: 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);
[bu] I]full]: same as data + wal.
The default value is C]standalone].
rebuild-xlogdb I]SERVER_NAME]
  Perform a rebuild of the WAL file metadata for C]SERVER_NAME] (or every server, using the C]all] shortcut) guessing it from the disk content. The metadata of the WAL archive is contained in the C]xlog.db] file, and every Barman server has its own copy.
recover I][OPTIONS]] I]SERVER_NAME] I]BACKUP_ID] I]DESTINATION_DIRECTORY]
  Recover a backup in a given directory (local or remote, depending on the C]--remote-ssh-command] option settings). See the Backup ID shortcuts (#shortcuts) section below for available shortcuts.
--target-tli I]TARGET_TLI]
  Recover the specified timeline.
--target-time I]TARGET_TIME]
  Recover to the specified time.

You can use any valid unambiguous representation (e.g: "YYYY-MM-DD HH:MM:SS.mmm").

--target-xid I]TARGET_XID]
  Recover to the specified transaction ID.
--target-name I]TARGET_NAME]
  Recover to the named restore point previously created with the C]pg_create_restore_point(name)] (for PostgreSQL 9.1 and above users).
--exclusive
  Set target xid to be non inclusive.
--tablespace I]NAME:LOCATION]
  Specify tablespace relocation rule.
--remote-ssh-command I]SSH_COMMAND]
  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].
--retry-times
  Number of retries of data copy during base backup after an error. Overrides value of the parameter C]basebackup_retry_times], if present in the configuration file.
--no-retry
  Same as C]--retry-times 0]
--retry-sleep
  Number of seconds of wait after a failed copy, before retrying. Overrides value of the parameter C]basebackup_retry_sleep], if present in the configuration file.
get-wal I][OPTIONS]] I]SERVER_NAME] I]WAL_ID]
  Retrieve a WAL file from the C]xlog] archive of a given server. By default, the requested WAL file, if found, is returned as uncompressed content to C]STDOUT]. The following options allow users to change this behaviour:
-o I]OUTPUT_DIRECTORY]
  destination directory where the C]get-wal] will deposit the requested WAL
-j output will be compressed using gzip
-x output will be compressed using bzip2
receive-wal I]SERVER_NAME]
  Start the stream of transaction logs for a server. The process relies on C]pg_receivexlog] to receive WAL files from the PostgreSQL servers through the streaming protocol.
--stop stop the receive-wal process for the server
--reset reset the status of receive-wal, restarting the streaming from the current WAL file of the server
delete I]SERVER_NAME] I]BACKUP_ID]
  Delete the specified backup. Backup ID shortcuts (#shortcuts) section below for available shortcuts.

BACKUP ID SHORTCUTS

Rather than using the timestamp backup ID, you can use any of the following shortcuts/aliases to identity a backup for a given server:
first Oldest available backup for that server, in chronological order.
last Latest available backup for that server, in chronological order.
latest same ast I]last].
oldest same ast I]first].

EXIT STATUS

0 Success
Not zero
  Failure

SEE ALSO

C]barman] (5).

BUGS

Barman has been extensively tested, and is currently being used in several production environments. However, we cannot exclude the presence of bugs.

Any bug can be reported via the Sourceforge bug tracker. Along the bug submission, users can provide developers with diagnostics information obtained through the C]barman diagnose] command.

AUTHORS

In alphabetical order:
[bu] Gabriele Bartolini <gabriele.bartolini@2ndquadrant.it> (project leader)
[bu] Stefano Bianucci <stefano.bianucci@2ndquadrant.it> (developer)
[bu] Giuseppe Broccolo <giuseppe.broccolo@2ndquadrant.it> (QA/testing)
[bu] Giulio Calacoci <giulio.calacoci@2ndquadrant.it> (developer)
[bu] Francesco Canovai <francesco.canovai@2ndquadrant.it> (QA/testing)
[bu] Leonardo Cecchi <leonardo.cecchi@2ndquadrant.it> (developer)
[bu] Gianni Ciolli <gianni.ciolli@2ndquadrant.it> (QA/testing)
[bu] Marco Nenciarini <marco.nenciarini@2ndquadrant.it> (lead developer)
Past contributors:
[bu] Carlo Ascani

RESOURCES

[bu] Homepage: <http://www.pgbarman.org/>
[bu] Documentation: <http://docs.pgbarman.org/>

COPYING

Barman is the exclusive property of 2ndQuadrant Italia and its code is distributed under GNU General Public License v3.

Copyright (C) 2011-2016 2ndQuadrant Italia Srl - <http://www.2ndQuadrant.it/>.

AUTHORS

2ndQuadrant Italy <http://www.2ndQuadrant.it>.
Search for    or go to Top of page |  Section 1 |  Main Index


Barman User manuals BARMAN (1) February 29, 2016

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.