How to configure backup maximum age when using "retention_policy"

729 views
Skip to first unread message

Marcel Bühler

unread,
Aug 30, 2017, 9:19:49 AM8/30/17
to Barman, Backup and Recovery Manager for PostgreSQL
We use barman 1.5.1. Here an excerpt of our server settings in barman.conf:

retention_policy_mode = auto
retention_policy = RECOVERY WINDOW OF 30 days
wal_retention_policy = main
minimum_redundancy = 2

Barman check fails. Here the problematic line:

backup maximum age: FAILED (interval provided: 1 day, latest backup age: 2 days, 28 minutes)



Isn't barman supposed to accept an old base backup if the WAL are available? How can we adjust the configuration so the check passes?

Gabriele Bartolini

unread,
Aug 30, 2017, 4:14:57 PM8/30/17
to pgba...@googlegroups.com
Hi Marcel,

  Thanks for using Barman. One first important thing to note though is that you should update to the latest stable version of Barman (2.2) instead of using the old 1.5.1.

  Second, retention policies and backup maximum age are two completely different things. I am sure that if you read this article you get a better understanding: https://blog.2ndquadrant.com/detecting-smelly-backups-barman/

Cheers,
Gabriele

--
 Gabriele Bartolini - 2ndQuadrant Italia - Director
 PostgreSQL Training, Services and Support
 gabriele....@2ndQuadrant.it | www.2ndQuadrant.it

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

Marcel Bühler

unread,
Aug 31, 2017, 4:00:23 AM8/31/17
to Barman, Backup and Recovery Manager for PostgreSQL
Hi Gabriele,

Thank you for your answer. I overlooked the "last_backup_maximum_age" option. This solved the issue.

Concerning the update to 2.2, we would like to do it. But version 1.5.1 is the latest version available in the repository (we use Ubuntu 16.04 LTS):

# apt-cache policy barman
barman
:
 
Installed: 1.5.1-1
 
Candidate: 1.5.1-1
 
Version table:
 
*** 1.5.1-1 500
       
500 http://ch.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
       
500 http://ch.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
       
100 /var/lib/dpkg/status


Can we still safely upgrade?

Cheers,

Marcel

Am Mittwoch, 30. August 2017 22:14:57 UTC+2 schrieb Gabriele Bartolini:
Hi Marcel,

  Thanks for using Barman. One first important thing to note though is that you should update to the latest stable version of Barman (2.2) instead of using the old 1.5.1.

  Second, retention policies and backup maximum age are two completely different things. I am sure that if you read this article you get a better understanding: https://blog.2ndquadrant.com/detecting-smelly-backups-barman/

Cheers,
Gabriele
--
 Gabriele Bartolini - 2ndQuadrant Italia - Director
 PostgreSQL Training, Services and Support
 gabriele.bartolini@2ndQuadrant.it | www.2ndQuadrant.it

2017-08-30 15:19 GMT+02:00 Marcel Bühler <mar...@lionstep.com>:
We use barman 1.5.1. Here an excerpt of our server settings in barman.conf:

retention_policy_mode = auto
retention_policy = RECOVERY WINDOW OF 30 days
wal_retention_policy = main
minimum_redundancy = 2

Barman check fails. Here the problematic line:

backup maximum age: FAILED (interval provided: 1 day, latest backup age: 2 days, 28 minutes)



Isn't barman supposed to accept an old base backup if the WAL are available? How can we adjust the configuration so the check passes?

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

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+u...@googlegroups.com.

Gabriele Bartolini

unread,
Aug 31, 2017, 4:13:48 AM8/31/17
to pgba...@googlegroups.com
Yes, please update.

The only 'important' change is that you have to explicitly set 'archiver = on' (from 2.0). Be aware that the check command is more strict.

Cheers,
Gabriele

--
 Gabriele Bartolini - 2ndQuadrant Italia - Director
 PostgreSQL Training, Services and Support
 gabriele....@2ndQuadrant.it | www.2ndQuadrant.it


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.

Marcel Bühler

unread,
Aug 31, 2017, 4:16:16 AM8/31/17
to Barman, Backup and Recovery Manager for PostgreSQL
Ok, thank you.

Cheers,

Marcel
Reply all
Reply to author
Forward
0 new messages