WAL archive: FAILED (please make sure WAL shipping is setup) postgresql10

1,909 views
Skip to first unread message

P1E33E

unread,
Jun 28, 2018, 7:47:28 AM6/28/18
to Barman, Backup and Recovery Manager for PostgreSQL
Hello

i need help to configure barman


-bash-4.2$ barman check postgretest
Server postgretest:
        WAL archive: FAILED (please make sure WAL shipping is setup)
        PostgreSQL: OK
        is_superuser: OK
        wal_level: OK
        directories: OK
        retention policy settings: OK
        backup maximum age: OK (interval provided: 1 day, latest backup age: 17 hours, 56 minutes, 59 seconds)
        compression settings: OK
        failed backups: OK (there are 0 failed backups)
        minimum redundancy requirements: OK (have 1 backups, expected at least 1)
        ssh: OK (PostgreSQL server)
        not in recovery: OK
        archive_mode: OK
        archive_command: OK
        continuous archiving: FAILED
        archiver errors: OK


My configuration is : One server rhel7 with postgresql10 and Barman ( only one server)

I want use the WAL because if i have crash i need to recover from an exact hours

My barman.conf:

[barman]
; System user
barman_home = /var/lib/barman
barman_user = barman
log_file = /var/log/barman/barman.log
compression = gzip
;reuse_backup = link
minimum_redundancy = 1
immediate_checkpoint = true
basebackup_retry_times = 3
basebackup_retry_sleep = 30
last_backup_maximum_age = 1 DAYS

[postgretest]
description = "serveur_master_pgsql"
ssh_command = ssh postgres@postgretest
;conninfo = host=postgretest user=postgres
conninfo = host=postgretest user=barman dbname=postgres
incoming_wals_directory = /postgrearclog
retention_policy_mode = auto
retention_policy = RECOVERY WINDOW OF 7 days
;wal_retention_policy = main
archiver = on
backup_method = rsync
;backup_directory = /postgrearclog

postgresql.conf:

wal_level = replica          
archive_mode = on         

#archive_command = 'test ! -f /var/lib/pgsql/10/data/pg_wal/%f && cp %p /postgrearclog/%f'
#archive_command = 'cp /var/lib/pgsql/10/data/pg_wal/%f /postgrearclog/%f'
archive_command = 'test ! -f /postgrearclog/%f && cp /var/lib/pgsql/10/data/pg_wal/%f /postgrearclog/%f'
#archive_command = 'rsync -a %p bar...@172.25.1.16:/postgrearclog/%f'


i have test all this archive command

barman.log:


2018-06-28 13:36:02,202 [23933] barman.wal_archiver WARNING: Moving unexpected file for postgretest from file archival: 0000000100000000000000A7
2018-06-28 13:36:02,202 [23933] barman.wal_archiver WARNING: Moving unexpected file for postgretest from file archival: 0000000100000000000000A8
2018-06-28 13:36:02,203 [23933] barman.wal_archiver WARNING: Moving unexpected file for postgretest from file archival: 0000000100000000000000A9
2018-06-28 13:36:02,203 [23933] barman.wal_archiver WARNING: Moving unexpected file for postgretest from file archival: 0000000100000000000000AA
2018-06-28 13:36:02,203 [23933] barman.wal_archiver WARNING: Moving unexpected file for postgretest from file archival: base
2018-06-28 13:36:02,203 [23933] barman.wal_archiver WARNING: Moving unexpected file for postgretest from file archival: errors
2018-06-28 13:36:02,203 [23933] barman.wal_archiver WARNING: Moving unexpected file for postgretest from file archival: streaming
2018-06-28 13:36:02,203 [23933] barman.wal_archiver WARNING: Moving unexpected file for postgretest from file archival: wals

Postgrelog:

with :
archive_command = 'test ! -f /postgrearclog/%f && cp /var/lib/pgsql/10/data/pg_wal/%f /postgrearclog/%f'

2018-06-28 13:39:54.237 CEST [20190] LOG:  database system is shut down
2018-06-28 13:40:21.845 CEST [24242] LOG:  database system was shut down at 2018-06-28 13:39:49 CEST
2018-06-28 13:40:21.856 CEST [24239] LOG:  database system is ready to accept connections


archive_command = 'rsync -a %p bar...@172.25.1.16:/postgrearclog/%f'

rsync: ERROR: cannot stat destination "/postgrearclog/0000000100000000000000AB": Permission denied (13)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(565) [Receiver=3.0.9]
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(605) [sender=3.0.9]
2018-06-28 13:39:53.043 CEST [20199] LOG:  archive command failed with exit code 12
2018-06-28 13:39:53.043 CEST [20199] DETAIL:  The failed archive command was: rsync -a pg_wal/0000000100000000000000AB bar...@172.25.1.16:/postgrearclog/0000000100000000000000AB

i have set 777 on postgrearclog it is the same


thanks for your help



P1E33E

unread,
Jun 28, 2018, 7:56:31 AM6/28/18
to Barman, Backup and Recovery Manager for PostgreSQL
AFTER 777 on the folder i have no error but the barman check not work

WAL archive: FAILED (please make sure WAL shipping is setup)
 


thanks for your help



Reply all
Reply to author
Forward
0 new messages