$ barman backup main_server_name
Starting backup using rsync-exclusive method for server pr in /backup/barman/pr/base/20181217T113448
Backup start at LSN: 8D/EA000028 (000000010000008D000000EA, 00000028)
This is the first backup for server pr
WAL segments preceding the current backup have been found:
000000010000008D000000E7 from server pr has been removed
000000010000008D000000E8 from server pr has been removed
Starting backup copy via rsync/SSH for 20181217T113448
ERROR: Backup failed issuing stop backup command.
DETAILS: Cannot terminate exclusive backup. You might have to manually execute pg_stop_backup on your PostgreSQL server
Copy done (time: 42 minutes, 37 seconds)
This is the first backup for server pr
WAL segments preceding the current backup have been found:
000000010000008D000000E9 from server pr has been removed
Asking PostgreSQL server to finalize the backup.
$ barman diagnose
{
"global": {
"config": {
"barman_home": "/backup/barman",
"barman_user": "barman",
"configuration_files_directory": "/etc/barman.d",
"errors_list": [],
"log_file": "/var/log/barman/barman.log\nlog_level = DEBUG"
},
"system_info": {
"barman_ver": "2.5",
"kernel_ver": "Linux ip-172-21-30-89.ap-south-1.compute.internal 3.10.0-862.el7.x86_64 #1 SMP Wed Mar 21 18:14:51 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux",
"python_ver": "",
"release": "RedHat Linux Red Hat Enterprise Linux Server release 7.5 (Maipo)",
"rsync_ver": "rsync version 3.1.2 protocol version 31",
"ssh_ver": ""
}
},
"servers": {
"pr": {
"backups": {
"20181217T113448": {
"backup_id": "20181217T113448",
"backup_label": null,
"begin_offset": 40,
"begin_time": "Mon Dec 17 11:34:48 2018",
"begin_wal": "000000010000008D000000EA",
"begin_xlog": "8D/EA000028",
"config_file": "/var/lib/pgsql/10/data/postgresql.conf",
"copy_stats": {
"analysis_time": 1.037675,
"analysis_time_per_item": {
"ebiz_tbsp_idx_01": 0.298601,
"ebiz_tbsp_tbl_01": 0.318942,
"pgdata": 0.420083
},
"copy_time": 2557.004391,
"copy_time_per_item": {
"ebiz_tbsp_idx_01": 687.790226,
"ebiz_tbsp_tbl_01": 1839.88369,
"pg_control": 0.138424,
"pgdata": 29.178925
},
"number_of_workers": 1,
"serialized_copy_time": 2556.959343,
"serialized_copy_time_per_item": {
"ebiz_tbsp_idx_01": 687.784991,
"ebiz_tbsp_tbl_01": 1839.874998,
"pg_control": 0.138424,
"pgdata": 29.16093
},
"total_time": 2558.094903
},
"deduplicated_size": null,
"end_offset": null,
"end_time": null,
"end_wal": null,
"end_xlog": null,
"error": "failure issuing stop backup command (Cannot terminate exclusive backup. You might have to manually execute pg_stop_backup on your PostgreSQL server)",
"hba_file": "/var/lib/pgsql/10/data/pg_hba.conf",
"ident_file": "/var/lib/pgsql/10/data/pg_ident.conf",
"included_files": null,
"mode": "rsync-exclusive",
"pgdata": "/var/lib/pgsql/10/data",
"server_name": "pr",
"size": null,
"status": "FAILED",
"tablespaces":
[
"ebiz_tbsp_idx_01",
16762,
"/postgres/ebiz_pg_data/ebiz_tbsp_idx_01"
,
"ebiz_tbsp_tbl_01",
16763,
"/postgres/ebiz_pg_data/ebiz_tbsp_tbl_01"
],
"timeline": 1,
"version": 100006,
"xlog_segment_size": 16777216
}
},
"config": {
"active": true,
"archiver": true,
"archiver_batch_size": 0,
"backup_directory": "/backup/barman/pr",
"backup_method": "rsync",
"backup_options": "exclusive_backup",
"bandwidth_limit": null,
"barman_home": "/backup/barman",
"barman_lock_directory": "/backup/barman",
"basebackup_retry_sleep": 30,
"basebackup_retry_times": 0,
"basebackups_directory": "/backup/barman/pr/base",
"check_timeout": 30,
"compression": null,
"conninfo": "host=172.21.30.111 user=ebiz_superuser dbname=ebiz_prod port=2090 password=saveAnand12#$",
"custom_compression_filter": null,
"custom_decompression_filter": null,
"description": "\u201cPR Backup\u201d",
"disabled": false,
"errors_directory": "/backup/barman/pr/errors",
"immediate_checkpoint": false,
"incoming_wals_directory": "/backup/barman/pr/incoming",
"last_backup_maximum_age": null,
"max_incoming_wals_queue": null,
"minimum_redundancy": 0,
"msg_list": [],
"name": "pr",
"network_compression": false,
"parallel_jobs": 1,
"path_prefix": "/usr/pgsql-10/bin/",
"post_archive_retry_script": null,
"post_archive_script": null,
"post_backup_retry_script": null,
"post_backup_script": null,
"post_delete_retry_script": null,
"post_delete_script": null,
"post_recovery_retry_script": null,
"post_recovery_script": null,
"post_wal_delete_retry_script": null,
"post_wal_delete_script": null,
"pre_archive_retry_script": null,
"pre_archive_script": null,
"pre_backup_retry_script": null,
"pre_backup_script": null,
"pre_delete_retry_script": null,
"pre_delete_script": null,
"pre_recovery_retry_script": null,
"pre_recovery_script": null,
"pre_wal_delete_retry_script": null,
"pre_wal_delete_script": null,
"recovery_options": "",
"retention_policy": "redundancy 3 b",
"retention_policy_mode": "auto",
"reuse_backup": "link",
"slot_name": "barman_pr",
"ssh_command": "ssh postgres@172.21.30.111",
"streaming_archiver": true,
"streaming_archiver_batch_size": 0,
"streaming_archiver_name": "barman_receive_wal",
"streaming_backup_name": "barman_streaming_backup",
"streaming_conninfo": "host=172.21.30.111 user=ebiz_superuser dbname=ebiz_prod port=2090 password=saveAnand12#$",
"streaming_wals_directory": "/backup/barman/pr/streaming",
"tablespace_bandwidth_limit": null,
"wal_retention_policy": "simple-wal 3 b",
"wals_directory": "/backup/barman/pr/wals"
},
"status": {
"archive_command": "rsync -a %p barman@172.21.30.89:/backup/barman/pr/incoming/%f",
"archive_mode": "on",
"archived_count": 0,
"config_file": "/var/lib/pgsql/10/data/postgresql.conf",
"connection_error": null,
"current_archived_wals_per_second": 0.0,
"current_size": 237863785776.0,
"current_xlog": "000000010000008D000000EB",
"data_directory": "/var/lib/pgsql/10/data",
"failed_count": 13604,
"hba_file": "/var/lib/pgsql/10/data/pg_hba.conf",
"ident_file": "/var/lib/pgsql/10/data/pg_ident.conf",
"is_archiving": null,
"is_in_recovery": false,
"is_superuser": true,
"last_archived_time": null,
"last_archived_wal": null,
"last_failed_time": "Mon Dec 17 13:34:39 2018",
"last_failed_wal": "000000010000008A00000097",
"pg_receivexlog_compatible": true,
"pg_receivexlog_installed": true,
"pg_receivexlog_path": "/usr/pgsql-10/bin/pg_receivewal",
"pg_receivexlog_supports_slots": true,
"pg_receivexlog_synchronous": false,
"pg_receivexlog_version": "10.6",
"pgespresso_installed": false,
"replication_slot":
"barman_pr",
true,
"8D/EB000000"
,
"replication_slot_support": true,
"server_txt_version": "10.6",
"stats_reset": "Wed Oct 24 11:05:14 2018",
"streaming": true,
"streaming_supported": true,
"synchronous_standby_names":
""
,
"systemid": "6615877748775783361",
"timeline": 1,
"wal_level": "replica",
"xlogpos": "8D/EB0001B0"
},
"system_info": {
"kernel_ver": "Linux ip-172-21-30-111.ap-south-1.compute.internal 4.14.77-81.59.amzn2.x86_64 #1 SMP Mon Nov 12 21:32:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux",
"python_ver": "",
"release": "",
"rsync_ver": "rsync version 3.1.2 protocol version 31",
"ssh_ver": ""
},
"wals": {
"last_archived_wal_per_timeline": {
"00000001": {
"compression": null,
"name": "000000010000008D000000EA",
"size": 16777216,
"time": 1545048082.2975357
}
}
}
}
}
}
$ barman check main_server_name
path_prefix = /usr/pgsql-10/bin/
description = “PR Backup”
conninfo = host=172.21.30.111 user=ebiz_superuser dbname=ebiz_prod port=2090 password=*
ssh_command = ssh postgres@172.21.30.111
backup_method = rsync
streaming_archiver = on
streaming_conninfo = host=172.21.30.111 user=ebiz_superuser dbname=ebiz_prod port=2090 password=
archiver = on
slot_name = barman_pr
reuse_backup = link
wal_retention_policy = main
retention_policy_mode = auto
retention_policy = REDUNDANCY 3