No xlog segments found from file archival

3,863 views
Skip to first unread message

lejeczek

unread,
Nov 14, 2017, 10:05:10 AM11/14/17
to Barman, Backup and Recovery Manager for PostgreSQL
hi
a novice here, trying to use barman on a master-slave repmgr setup.

I do, on master:
$ barman check rider
Server rider:
    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: FAILED (interval provided: 3 days, latest backup age: No available backups)
    compression settings: OK
    failed backups: OK (there are 0 failed backups)
    minimum redundancy requirements: OK (have 0 backups, expected at least 0)
    ssh: OK (PostgreSQL server)
    not in recovery: OK
    archive_mode: OK
    archive_command: OK
    continuous archiving: OK
    archiver errors: OK

then in log:
..
2017-11-14 15:00:23,338 [2035754] barman.server ERROR: Check 'WAL archive' failed for server 'rider'
2017-11-14 15:00:23,384 [2035754] barman.server ERROR: Check 'backup maximum age' failed for server 'rider'

If I try to backup, the in log:
..
2017-11-14 15:00:51,523 [2035888] barman.server ERROR: Check 'WAL archive' failed for server 'rider'
2017-11-14 15:00:51,569 [2035888] barman.server INFO: Ignoring failed check 'backup maximum age' for server 'rider'
2017-11-14 15:00:52,202 [2035888] barman.server ERROR: Impossible to start the backup. Check the log for more details, or run 'barman check rider'

I believe my repmgr master-slave works fine, I can for example switch over fine,

I hope someone could point me on the right path of investigation. I checked repmgr docs and I believe I have it as the docs say, same for barman, and not being pg expert it's really hard to guess what's wrong.

many thanks, L.

Amarnath Gopalan

unread,
Nov 17, 2017, 4:29:18 AM11/17/17
to Barman, Backup and Recovery Manager for PostgreSQL
 WAL archive: FAILED (please make sure WAL shipping is setup)  
Fix : Check for the below parameter in postgresql server 
postgres=# show WAL_LEVEL ;
 wal_level
-----------
 archive
(1 row)

postgres=# show archive_mode ;
 archive_mode
--------------
 on
(1 row)

If its set properly please run " barman cron " command in barman server and later you  need to put this in crontab

#Issue 4 :backup maximum age: FAILED (interval provided: 1 day, latest backup age: No available backups)
#Fix : No Fix is required this can be ignored , we getting this error as we dont have any current backup for this postgres server

Hope this helps . 

Thanks
Amar

lejeczek

unread,
Nov 20, 2017, 7:53:27 AM11/20/17
to Barman, Backup and Recovery Manager for PostgreSQL
I understand that having repmgr does not invalidate barman and it should work. But having repmgr set up according to their howtos/docs I get:


postgres=# show WAL_LEVEL;
 wal_level
-----------
 replica

(1 row)

postgres=# show archive_mode;
 archive_mode
--------------
 on
(1 row)

Should barman run ok with above?

Amarnath Gopalan

unread,
Nov 20, 2017, 9:27:06 PM11/20/17
to pgba...@googlegroups.com
Please paste the o/p of 
barman show-server rider 

Did you run "barman cron" from barman server ? if not try switching the logs and run barman cron . 

1) from postgres server 
select pg_switch_xlog() ; -- for 9.6 and earlier 
or
select pg_switch_wal() ; -- for 10 

After switching logs you should see logs shipped to incoming directory.If there is no much activity on database logs will not be generated so you can try creating a dumy table and do some insertion so that you can generate some logs.

2) from barman server
barman cron; 
barman check rider ; 


--
--
You received this message because you are subscribed to the "Barman for PostgreSQL" group.
To post to this group, send email to pgba...@googlegroups.com
To unsubscribe from this group, send email to
pgbarman+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/pgbarman?hl=en?hl=en-GB

---
You received this message because you are subscribed to the Google Groups "Barman, Backup and Recovery Manager for PostgreSQL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pgbarman+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages