ubuntu / zsys

ZSys daemon and client for zfs systems
GNU General Public License v3.0
301 stars 43 forks source link

How to manage zsys-generated clones after grub history use? #229

Open fubar-1 opened 2 years ago

fubar-1 commented 2 years ago

This isn't a bug, it's another question from a zsys padawan-learner.

I just used GRUB's zsys-generated history to recover from a failed install (apt tried to hose my system when uninstalling pipewire. Yes I ignored the warning and hit enter too fast - muscle memory I guess) Zsys worked great and recovered the system to a known-good state. Yay!

[I don't understand why Ubuntu packages things so that just uninstalling some minor application triggers apt to attempt to uninstall the desktop but that's not relevant here]

So now I have the old broken clone system state sitting there in zfs and I'd like to be rid of it. What is the correct (safe) way to delete the datasets? Do I use zsysctl state remove? From what I'm reading, it seems to be only for fully-qualified zfs dataset names so do I just use it for each dataset or is there a way to leverage the brilliance of zsys to delete them all at once? I'm a bit hesitant to experiment for obvious reasons ;-)

Also, does this state put the system at more risk of bug #218 ?

Finally, a suggestion: if zsys development ever resumes, perhaps add a simple rollback functionality into grub recovery? Cloning is great and has it's uses but many folks would probably prefer just a simple rollback since they're recovering from a fail just minutes prior and aren't looking for data recovery or analysis of that failed boot image.