[Dirvish] expiry rules
jon at radel.com
Wed Mar 16 17:58:22 UTC 2011
On 3/16/11 1:05 PM, Dave Howorth wrote:
> Jon Radel wrote:
>> I was nodding my head in agreement to your message until the very end of
>> this. This has come up before on the mailing list. If I understand the
>> OP correctly, his primary desire is that dirvish apply a higher level
>> understanding of the "value" of a given backup and expire based on this,
>> rather than "mindless" application of the expiry date assigned at backup
>> The classic example I remember from some years ago was the person who
>> was terribly bent out of shape that after his disk failed dirvish
>> continued to delete images until he was left with a single image. It
>> had been successful, but it was very far from being the latest image at
>> the time of failure.
> I definitely agree that it is sensible to keep the latest image, but I
> think that's what dirvish is supposed to do.
> There's a comment in dirvish-expire that says:
> ## WARNING: don't mess with the sort order, it is needed so that if
> ## WARNING: all images are expired the newest will be retained.
> Are we saying that the code doesn't match the comment?
Nope, but I will go so far to venture that you're reading way too much
into that and maybe should read it a bit more literally. I suspect that
you'll find that if a given execution of dirvish-expire is expected to
expire *all* images in a vault that it will, as stated, not erase the
most recent image. I've not tested this.
This would have nothing to do with the problem of situations where
images are created with a variety of different retention periods and it
turns out that one of the "throw out in a couple of days" images was the
last one made before disaster/break-in-backup-routine/what-have-you, but
it's been expired before you realize that the "keep for months and
months" images are a bit staler than you'd like.
I really don't see any way for dirvish to fix this without recognizing
that an "event" has happened and adjusting expiration dates to
compensate. The only other fix I can think of is to use only a single
retention period, in which case, the last image remaining should always
be the most recent. But even that won't save you if what you wanted was
to keep the last image made before a big break in backups.
jon at radel.com
More information about the Dirvish