Replies: 1 comment 5 replies
-
|
I'm not sure if you understand what a prune operation is? Restic backups are based on the concept of 'snapshots'. Think of a snapshot as a list of directory and file versions, based on contents. I'm not the world's expert on restic, but my understanding is that snapshots share a repository, and this allows restic to not have duplicated data - because most snapshots, most of the time, are 90%+ the same as the previous snapshot. Maybe 10% of the files change (new files, deleted files, files which have been renamed or moved to a different folder in the filesystem, or files where the contents have changed). Every time a restic backup job runs (whether a backrest 'plan' or something you fire off with a script or cron job or manually with CLI), restic creates a new snapshot. Generally speaking, most backup plans will delete old snapshots after some period of time, so that your backup repository size doesn't tend to grow to infinity, and so that you can actually delete files at some point, that you intend to delete. So, maybe a backup plan might have the following retention policy:
This snapshot policy means that eventually, some snapshots get deleted. HOWEVER, the data in the repository isn't deleted immediately when a snapshot is deleted. Instead, the prune job, whenever you run it, runs through all the snapshots and figures out what data in the repository is still referred to by any currently extant snapshot, and preserves that data, but deletes any 'orphaned data' which no snapshot refers to any longer. After deleting the data it compacts and re-compresses the repository data. Prune is generally a 'safe' operation, because if no snapshots refer to the data, there's really no way to recover it - it's there, but restic no longer has a way to access it, because you access files through the snapshots - e.g. you can restore a snapshot, or mount the snapshot, etc. If you REALLY want to disable the prune functionality in backrest, I think you probably could do that through settings. But be aware that your repository will likely grow with a lot of junk data that's no longer accessible - unless you keep every snapshot forever. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
I just plugged backrest to my new backups. There are two strage things I see:
The first one is worrisome: what are these
pruneandcheckcommans scheduled for 2026-01-01? They are not mine and I do not want any to happen out of the blue.The second one, I guess, mean that these backups are not associated to any plan (which is normal - they run though their own means). I just wanted to make sure this is indeed the case
Beta Was this translation helpful? Give feedback.
All reactions