[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should I keep all archives



Hi Romu,

The general term for this is "Backup rotation scheme", if you want to see some
approaches that other people use:
https://en.wikipedia.org/wiki/Backup_rotation_scheme

I don't recommend only keeping the last 3 days, for the reasons described on
the "First in, first out" section on the above wikipedia page.  The
"Grandfather-father-son" scheme is much more common.

You can't use the tarsnap binary itself to automatically remove archives that
are more than x days old, but there's a number of third-party scripts which do
this.  Please see the "Archive management" section:
https://www.tarsnap.com/helper-scripts.html

Cheers,
- Graham

On Sun, Jun 27, 2021 at 10:26:07AM +1200, Romo Hu wrote:
> Hi,
> 
> My system has a daily cron job that does tarsnap backup which has been 
> running since 2017, and "tarsnap --list-archives" shows a lot of 
> archives.  Should I care?  Is it ok to just let the archive number keep 
> growing?  If there will never be a need to restore data that are more 
> than 3 days old, can I just remove all archives that are more than 3 
> days old?  Is it possible to configure tarsnap to only keep archives of 
> the recent 3 days?
> 
> Regards
> Romu