[Borgbackup] Prune and Transient files

Sascha Ternes imperator at jedimail.de
Sun Oct 13 02:42:32 EDT 2019


Hi Kevin!

Am 13.10.19 um 00:10 schrieb Kevin Elliott:
> Something I am not understanding about Pruning, hope you can help
> please. Lets say I create a new archive every hour of the day, and
> throughout the day some files are created and some hours later they are
> deleted, e.g. file X created at 3am and deleted at 6pm. With a prune
> policy to keep-daily, is it possible to lose files? What happens to that
> transient file X that only existed intra-day, with daily pruning of
> archives is it lost? 

You got it right. But it's the same with any time scale. Every file,
after it is deleted, will eventually "get lost" if you prune your repo.

Roughly speaking: Borg prune will keep the latest backup in all time scales.
Doc says: borg prune deletes "all archives not matching any of the
specified retention options".
You may --keep-hourly 48 and --keep-daily 7 to hold back hourly backups
for 2 days and daily backups for 7 days. If you constantly create more
backups, pruning will delete oldest backups.
In this example, 48 hours after you deleted the transient file, it will
be removed from your repo.

(Side note: Stricly speaking, Borg does not backup up "files", it backs
up unique chunks of files, but that makes no difference in the result.)

Sascha


More information about the Borgbackup mailing list