From: | scheuref <francois(at)synways(dot)com> |
---|---|
To: | pgsql-www(at)postgresql(dot)org |
Subject: | Re: patch to fix retention in pg_backup_rotated.sh |
Date: | 2016-04-04 15:16:01 |
Message-ID: | 1459782961012-5896738.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-www |
Hello
My patch should use 28 days instead of 31 for the month length:
+EXPIRED_DAYS=`expr $((($MONTHS_TO_KEEP * 28) - 1))`
The script should then correctly keep $MONTHS_TO_KEEP monthly backups, with
0 <= $MONTHS_TO_KEEP <= 12 .
Best regards
Francois Scheurer
PS: the monthly backup of February of bissextile year will be wrongly
deleted if $MONTHS_TO_KEEP = 12 and if it is the oldest backup. I think it
is not a big issue as long as 11 backups remains. Solving this issue will
require the script to be re-written differently.
--
View this message in context: http://postgresql.nabble.com/patch-to-fix-retention-in-pg-backup-rotated-sh-tp5896424p5896738.html
Sent from the PostgreSQL - www mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2016-04-04 16:16:09 | misplaced headers |
Previous Message | Andreas 'ads' Scherbaum | 2016-04-03 19:19:55 | Re: Should pgFoundry mentions be nuked from the wiki? |