[Dirvish] A suggestion for dirvish-expire

Paul Slootman paul at debian.org
Wed Dec 5 11:46:35 UTC 2012


On Wed 05 Dec 2012, Dave Howorth wrote:
> 
> Either you or I misunderstands how expiry works. I think dirvish
> calculates the expiry date when it creates each backup and stores it in
> the summary file. dirvish-expire just checks that date, so changing the
> day on which you run dirvish makes absolutely no difference to backups
> that already exist.

You're correct :)
dirvish-expire checks each summary file for the Expires: line and if
that date is in the past, then removes that image... unless it's the
last successful image.

I use dirvish to backup a couple of hundred systems. Those backups are
typically kept for 2 weeks. Occasionally a system is replaced or
removed; I want to keep the last backup for a couple of months without
a daily email about "cannot expire bla No unexpired good images" so as
soon as I get such an email, I do:

perl -i -pe 's/^(Expire:.*==).*/$1 2013-02-28 22:00:00/' */*/summary

(adjust date as necessary :-)


Paul


More information about the Dirvish mailing list