snapper-rollback icon indicating copy to clipboard operation
snapper-rollback copied to clipboard

The difference between `snapper-rollback`, and the default `snapper rollback`.

Open konstantin1722 opened this issue 1 year ago • 4 comments

I understand correctly that system rollback is possible only from a live image? I can make this conclusion because the readme file does not contain instructions for use, but it does contain a link to the arch wiki with a section where recovery is performed through a live image.

Can you tell me how your snapper-rollback differs from the default snapper rollback. Do they work the same way? I saw you mentioned OpenSUSE, but no specifics. I would be grateful for an answer or even a link to a resource where I can read it (arch wiki doesn't count).

konstantin1722 avatar Aug 01 '23 10:08 konstantin1722

The difference between the built-in rollback and this script is that snapper can't make any assumptions around the partitions/subvolumes layout. snapper rollback moves subvolumes and mounts them so that the system is rolled back but introduces techdebt: the subvolume layout becomes complex to work with, and this complexity increases every time the rollback is run. snapper-rollback keeps the same exact subvolume layout, but the flipside is that it has to assume a specific partition layout.

This script can be run both from a live image and from a system installed to a hard drive. The only difference between running it from a hard drive and running it from a live image is the config file /etc/snapper-rollback.conf takes different values.

If you're looking for context around how things work, archwiki is the best resource: snapper-rollback just automates the wiki page. If you're looking for context on the partition layout choice, I'd recommend going through this btrfs wiki page and this reddit thread

Good docs are important and take effort. Would creating a PR that updates the repo readme and/or adds a docs directory with what you've learned, make sense to help the next person asking these questions?

jrabinow avatar Aug 15 '23 18:08 jrabinow

In that case, I will look into this issue soon and make an edit to the readme file.

I don't know how long this one's gonna take. But I think I can say I'm making a promise to do it.

konstantin1722 avatar Aug 21 '23 06:08 konstantin1722

Another difference is that snapper-rollback leaves a @YYYY-MM-DDTHH:MM-subvolume forever, if I understand it correctly. I have about ten @YYYY-MM-DDTHH:MM subvolumes now. Can I delete them? If so, how?

thebestcloudislocal avatar Oct 09 '23 14:10 thebestcloudislocal

@thebestcloudislocal yes, you can delete those as soon as you feel comfortable that your system is working as intended and that there's no data you'd like to recover from the old snapshot.

For deletion, simply mount the btrfs root partition anywhere you like and delete the snapshot just like you would delete any other snapshot. Please make sure to delete the right snapshot - once it's deleted, it's gone forever!

jrabinow avatar Oct 09 '23 19:10 jrabinow