3 ms·
Since I moved my personal laptop from Mac to Linux I have been using borg. It works really well so far. One thing that’s confusing me is the prune strategy. I
by spaetzleesser 5y ago
Since I moved my personal laptop from Mac to Linux I have been using borg. It works really well so far.
One thing that’s confusing me is the prune strategy. It seems prune removes the whole backup set at once. Let’s say I have daily backups and weekly backups. At some point I am pruning the daily backups. It seems this means that if the weekly backup ran on Sunday but a file was created on Monday and deleted on Friday, the file would be completely deleted during prune and there would be no trace of it.
I would much prefer if the pruning was done on per file basis and not by pruning whole backup sets.
- ThomasWaldmann 5y agoMaybe have a look at borgbackup docs to use the same terminology, otherwise it might get confusing. When you create a backup ARCHIVE in a borg REPOSITORY, the archive contains all input files you gave to borg. Each archive has a name and usually the name is something like machinename-setname-date-time. You can create such backups rather often (that is cheap, due to deduplication), but you do not want to keep tons of archives long term (some borg commands take O(archive count) time). Thus, one runs borg prune to "thin out" archives and only keep some following some prune policy, like keeping 60 daily, 12 monthly, 10 yearly or so. It is important to use --prefix if one creates multiple different archive sequences in the same repo, e.g. if you create pc-home-date-time as well as pc-system-date-time - then you need to run prune with --prefix=pc-home- and another prune with --prefix=pc-system- . Usually, archives are not modified after their creation (the only way to do that is to carefully use borg recreate command).
- axiolite 5y ago> I would much prefer if the pruning was done on per file basis and not by pruning whole backup sets. Then just don't prune! Unchanged files take no space. There's no reason you can't keep many months of daily backups, and set your prune to only do: --keep-within=365d For those who aren't familiar with Borg, there is no such thing as a weekly backup, daily backup, monthly backup, etc. Every backup is a quick full backup. It's only the prune (which deletes old backups) option that gives you the choice of bracketing your backups into monthly/weekly/daily sets, so it'll save the last backup of each month for the last X months, the last backup of each week for X weeks, etc.
- spaetzleesser 5y agoYou are right. Not pruning may be the solution.