Flexible retention

24 views
Skip to first unread message

Christian Tardif

unread,
Feb 14, 2025, 10:43:17 AMFeb 14
to bareos...@googlegroups.com
Is there any way to have a flexible retention period, like mentioning a 1 year retention period, but also specifying something like (up-to 1 year, unless missing space) ?

--
Christian Tardif


Andreas Rogge

unread,
Feb 18, 2025, 10:07:23 AMFeb 18
to bareos...@googlegroups.com
Am 14.02.25 um 16:43 schrieb Christian Tardif:
> Is there any way to have a flexible retention period, like mentioning a
> 1 year retention period, but also specifying something like (up-to 1
> year, unless missing space) ?
No. The rentention is a minimum. You cannot specify "not longer than one
year". You can specify "not shorter than one year" tough.

If you want "please overwrite my data before you run out of space" you
should to set your retention short enough so that there is something to
recycle before Bareos runs out of space.
It will still fill up all volumes before recycling anything.

Best Regards,
Andreas

--
Andreas Rogge andrea...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221-630693-86
http://www.bareos.com

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz

Spadajspadaj

unread,
Feb 18, 2025, 10:38:59 AMFeb 18
to bareos...@googlegroups.com


On Tue, 2025-02-18 at 16:07 +0100, Andreas Rogge wrote:
Am 14.02.25 um 16:43 schrieb Christian Tardif:
Is there any way to have a flexible retention period, like mentioning a
1 year retention period, but also specifying something like (up-to 1
year, unless missing space) ?
No. The rentention is a minimum. You cannot specify "not longer than one
year". You can specify "not shorter than one year" tough.

If you want "please overwrite my data before you run out of space" you
should to set your retention short enough so that there is something to
recycle before Bareos runs out of space.
It will still fill up all volumes before recycling anything.

Just for the sake of completness - theoretically you could build some completely custom solution spawning external script and running the purge command using any criteria you want (even randomly if you fancy a bit of thrill in your life).
But it is definitely _not_ and I repeat _NOT_ something I advise doing. That would be effectively reimplementing a huge part of core bareos functionality using duct tape and it would be prone to unforeseen problems.
So don't try it at home! And definitely don't think about doing such stuff out of a lab environment!!! You've been warned.

MK

Christian Tardif

unread,
Feb 18, 2025, 6:39:04 PMFeb 18
to bareos-users
Thanks all for your input. Will definitely be looking at shortening my minimum backup lifetime as a different way of looking at it.

Christian
Reply all
Reply to author
Forward
0 new messages