Retention policies, WAL dimensions and database recoverability

611 views
Skip to first unread message

Lorenzo Battistini

unread,
May 29, 2015, 10:59:54 AM5/29/15
to pgba...@googlegroups.com
Hi all,

take the following scenario:
 - perform 'barman backup' once a week
 - have retention_policy = RECOVERY WINDOW OF 3 DAYS

If I increase retention_policy to RECOVERY WINDOW OF 1 WEEK, disk space used by barman to keep all data he needs to satisfy the configuration will not increase, is it true?

Moreover, having retention_policy = RECOVERY WINDOW OF 1 WEEK, if my company closes for holydays for 2 weeks and a disaster happens at the beginning of the first week, when I come back to work, does barman allow me to restore the database before the disaster? Or does 'barman cron' and 'barman backup' always remove what is older than 1 week?

Thanks

mani...@gmail.com

unread,
Jun 1, 2015, 8:21:12 AM6/1/15
to pgba...@googlegroups.com
Hi,

Barman removes older backups only if the another one allows a recover within the retention policy.
If you have a 3 days-old backup and a 2 weeks-old, the last one is obsolete but barman won't remove it because the first one won't be enough to satisfy the recover window.

Source : https://groups.google.com/forum/#!searchin/pgbarman/remove/pgbarman/I-02l2gLsTw/uBktyY30_oYJ (I am also an happy user of Barman).

Xavier C.

Gabriele Bartolini

unread,
Jun 3, 2015, 5:12:30 AM6/3/15
to pgba...@googlegroups.com
Hi Lorenzo,

  And ... well done Xavier! You have to think in terms of "point of recoverability" which is defined by the RECOVERY WINDOW value. Through the point of recoverability you can specify that *AT LEAST* you want to be able and recover the cluster situation back to that point. It is the minimum horizon for your recovery operations.

  The maximum point of recoverability you can reach is the end of the base backup prior to the recoverability point (assuming all the stream of WAL files is correctly archived - which should be the normal case).

  I hope this makes it clearer. Moreover, it is probably worth reading:


  Thanks for asking and thanks Xavier for responding to Lorenzo (and for your nice words too)!

Ciao,
Gabriele

--
 Gabriele Bartolini - 2ndQuadrant Italia - Managing 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+u...@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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gabriele Bartolini

unread,
Jun 3, 2015, 5:17:40 AM6/3/15
to pgba...@googlegroups.com
I forgot to add that you can always use the minimum_redundancy option to make sure that at least you have X backups for a server.

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

Reply all
Reply to author
Forward
0 new messages