Barman : ERROR: Impossible to start the backup. Check the log for more details

I have configured the barman for taking the backups using streaming replication connection with below configuration file.

[streaming-pg]
description =  “Example of PostgreSQL Database (Streaming-Only)”
conninfo = host=192.168.41.139 user=barman dbname=postgres
streaming_conninfo = host=192.168.41.139 user=streaming_barman
backup_method = postgres
streaming_archiver = on
slot_name = barman
;streaming_wals_directory = /home/barman/pg_receivexlog/streaming-pg
backup_directory = /home/barman/BACKUP/streaming-pg
;backup_options = concurrent_backup
retention_policy = REDUNDANCY 3

When I try to take the backup I am getting below error.

$ barman backup streaming-pg  
ERROR: Impossible to start the backup. Check the log for more details, or run ‘barman check streaming-pg ‘

I checked the server status

[barman@localhost tmp]$ barman check streaming-pg
Server streaming-pg:
        WAL archive: FAILED (please make sure WAL shipping is setup)
        PostgreSQL: OK
        is_superuser: OK
        PostgreSQL streaming: OK
        wal_level: OK
        replication slot: OK
        directories: OK
        retention policy settings: OK
        backup maximum age: OK (no last_backup_maximum_age provided)
        compression settings: OK
        failed backups: OK (there are 0 failed backups)
        minimum redundancy requirements: OK (have 0 backups, expected at least 0)
        pg_basebackup: OK
        pg_basebackup compatible: OK
        pg_basebackup supports tablespaces mapping: OK
        pg_receivexlog: OK
        pg_receivexlog compatible: OK
        receive-wal running: OK
        archiver errors: OK

I have executed the below command to forcefully change the archivelog repository file by using below command, and backup completed successfully.

[barman@localhost tmp]$ barman switch-wal streaming-pg
The WAL file 000000010000000000000005 has been closed on server ‘streaming-pg’

[barman@localhost tmp]$
[barman@localhost tmp]$ barman check streaming-pg
Server streaming-pg:
        PostgreSQL: OK
        is_superuser: OK
        PostgreSQL streaming: OK
        wal_level: OK
        replication slot: OK
        directories: OK
        retention policy settings: OK
        backup maximum age: OK (no last_backup_maximum_age provided)
        compression settings: OK
        failed backups: OK (there are 0 failed backups)
        minimum redundancy requirements: OK (have 0 backups, expected at least 0)
        pg_basebackup: OK
        pg_basebackup compatible: OK
        pg_basebackup supports tablespaces mapping: OK
        pg_receivexlog: OK
        pg_receivexlog compatible: OK
        receive-wal running: OK
        archiver errors: OK

[barman@localhost tmp]$ barman backup  streaming-pg
Starting backup using postgres method for server streaming-pg in /home/barman/BACKUP/streaming-pg/base/20180206T134127
Backup start at LSN: 0/6000060 (000000010000000000000006, 00000060)
Starting backup copy via pg_basebackup for 20180206T134127
Copy done (time: 3 seconds)
Finalising the backup.
This is the first backup for server streaming-pg
WAL segments preceding the current backup have been found:
        000000010000000000000003 from server streaming-pg has been removed
        000000010000000000000004 from server streaming-pg has been removed
        000000010000000000000005 from server streaming-pg has been removed
Backup size: 20.5 MiB
Backup end at LSN: 0/8000000 (000000010000000000000007, 00000000)
Backup completed (start time: 2018-02-06 13:41:27.096956, elapsed time: 3 seconds)
Processing xlog segments from streaming for streaming-pg
        000000010000000000000006

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s