[Borgbackup] Option to keep yearly backup counting from first backup?

Dan Christensen jdc at uwo.ca
Tue Jan 14 13:28:31 EST 2020


If you use "borg rename" to rename the oldest backup to something with
a different prefix, and then limit to the main prefix when pruning,
the oldest backup will always stick around.  Then you'd get

May 2017
Dec 2017
Dec 2018
Dec 2019

etc, which might be good enough for what you want.

Or, you could manually rename one May backup each year to ensure that
those ones are saved.

You might also find that keeping monthly backups is fairly space
efficient.  When I've tried to save space by pruning old backups,
the repo size usually changes much less than I expected.

Dan

On Jan 14, 2020, Clemence Magnien <clemence.magnien at lip6.fr> wrote:

> Hi,
>
> I hope this is the right place to post this question.
>
> I've been using borg for a while for backing up my home directory
> and am very satisfied with it.
>
> I'd like to keep:
>  - 4 daily backups
>  - 4 weekly backups
>  - 12 monthly backups
>  - 1 backup per year for all years since I've started using it.
>
> As I started using borg in may 2017, the keep-yearly option of prune wants to keep
> the latest backup in 2017 and remove the ones before that.
>
> I however would like to preserve as much of my history as possible, so
> I would like to keep:
>  - one backup for may 2017
>  - one backup for may 2018
>  - 12 monthly backups for 2019
>  - (and 4 weekly and 4 daily recent bakcups)
>  
> Is there a possibility to count the backups you want to keep from the time
> I started using borg rather than counting one at the end of each calendar
> year?
>
> I know that I can use the --keep-within option but it seems a bit convoluted.
>
> Best,
> Clémence
>
> _______________________________________________
> Borgbackup mailing list
> Borgbackup at python.org
> https://mail.python.org/mailman/listinfo/borgbackup


More information about the Borgbackup mailing list