Hi!
I’ve searched through the manual, github, and this forum but I could not find an approach for a use-case I do think is quite common.
I’ve done some backups with restic (I’m still new to it). Meanwhile my backup disk is at >99% usage. So I need to ignore more directories. Therefore, I extended the exlude-file.
Now I need to get rid of the data within the snapshots for these new excludes before I’m able to create a new snapshot. If not, my backup disk would be 100% full which is something restic does not handle to my knowledge. (Which is very bad IMHO.)
I’m guessing that prune might delete this data somehow?
I tried to mount the latest snapshot and delete the files but the mount point is read-only and I do think this should not be overridden for good reasons.
Note that at 99% full, you’re still going to have problems even if you could rewrite snapshots in this way, because the data is not immediately deleted. Prune needs to rewrite packs containing deleted objects into new packs before it can delete the old packs, so you need some free space for prune to work correctly – and if you can’t prune, there’s not really any way to remove data blobs.
You likely need to temporarily copy the repository to a larger disk before you can fix this issue.
Do you really need the old snapshots? Personally, I wouldn’t complicate things - I’d just delete the entire repository and start a new one. Reason: I never need that old data anyway, and I always have the second backup to lean on if I did. Because you do have a second backup, right?
Sorry to necro this thread, but it fits perfectly to my situation too:
I made a couple of snapshots then realized I should have excluded the thumbnails folders of my photo backups as those can easily be recreated and just pollute my backups.
If I now exclude thumbnail folders, will subsequent forget/prune commands make them “drop” out of my snapshots?