[Borgbackup] variable purge policies per filesystem tree

Marian Beermann public at enkore.de
Sat Sep 16 12:35:43 EDT 2017


Hi Antoine,

On 16.09.2017 16:41, Antoine Beaupré wrote:
> The only way I can think of doing this is having two separate set of
> archives within the repositories, with each its own purge policies.
> That feels rather clunky because I need to rely on some hardcoded
> special naming pattern on the archive names to purge (or not) certain
> archievs.
> 
> Right now my naming scheme is, more or less:
> 
>     $(hostname)-$(date +%Y-%m-%d)$tag
> 
> where $tag is a manual tag I could append to make more than one manual
> snapshot per day. Now, I am changing this to:
> 
>     $(hostname)-$tag-$(date +%Y-%m-%d)
> 
> With $tag defaulting to "auto" in the script:
> 
>     tag=${1:-auto}
> 
> It looks like a trivial change, but it allows me to use different purge
> policies thanks to the -P/--prefix parameter in borg purge. I also had
> to rename all archives to add the "auto" parameter:

I added --glob-archives some time ago to allow for more flexible ^W ^W
sensible naming schemes, but it's only available in 1.1.



More information about the Borgbackup mailing list