[Dirvish] How to expire all images but one without knowing their expiration time?

Paul Slootman paul at debian.org
Thu Jul 27 07:40:15 UTC 2017


Better late than never...

On Sun 14 May 2017, Vortex wrote:
> 
> is there a way to dell dirvish-expire to delete all images but the most
> recent one?

No.
You could update the summary files to modify the "Expire:" line, which
is what dirvish-expire looks at.

> I know one can just set the --time option far enough to the future, but
> this strikes me as kind of of a hack and it may fail on a very long
> (maybe faulty) expiration time. Is there a more elegant way that ignores
> /any/ expiration time no matter what?

No.

> The most recent one should be preserved automatically since the "no
> unexpired good images" rule, I guess. I just mention it to be sure.

The rule is that there will be ONE image preserved, even if that one
should be expired according to the age rules. That image is not
necessarily the most recent one! If you configure all Monday images to
be preserved one month, and other daily images to be preserved one week,
then it's entirely possible that if you stop making backups on a Friday,
the images made on Tuesday through Thursday are removed and you're left
with the older Monday backup.

If you know you're going to be in such a situation then just edit the
summary file of the most recent image to have en expiry somewhere in
2099 (or 2038, if you're worried about the 32 bit timer rolling over).


Paul


More information about the Dirvish mailing list