The big names mostly can’t yet, but some lesser-known Linux distributions offer the ability to undo updates and recover from damage, even automatically.

With a new version of Linux Mint available, a lot of people – especially less-technical types – are about to upgrade their PCs. As with almost all major upgrades, inevitably some some stuff won’t work with the new version. Going back is difficult, although Mint does have a solution, and so do some smaller distros.

Linux Mint includes the Timeshift utility, originally developed by Teejeetech, but that doesn’t make it invulnerable. No operating system is, as amply demonstrated recently by CrowdStrike. If installed on a file system that supports copy-on-write (COW) snapshots, Timeshift can use that, but if you chose some other disk format, it can also back up your system files using rsync to another drive.

For now, most Linux file systems can’t handle snapshotting, including the default ext4 or its predecessors, or XFS, or the now-vanishing ReiserFS. Several existing file systems that work on Linux do include snapshot support, including bcachefs, ZFS, and Btrfs. However, there are solid reasons why most distros don’t include the functionality.

For instance, while OpenZFS does support snapshots, and several distributions include ZFS, including TrueNAS Scale, Ubuntu, Proxmox, Void Linux, and NixOS, the ZFS code can’t be compiled into the Linux kernel due to an incompatible software license. Thus, from appropriate levels of caution, OpenZFS isn’t part of either SUSE’s or Red Hat’s enterprise offerings. Their compliance with multiple legal requirements and certifications is a big part of their corporate appeal. (For the curious, both companies maintain lists of their certifications. Red Hat has a 16-section list and SUSE a respectable dozen sections. Some companies will pay good money for this stuff.)

Red Hat removed Btrfs from RHEL six years ago, and is working on its own, all-GPL combined volume management system and file system called Stratis. Since Btrfs was invented there, Oracle had a simpler route available for its RHEL-compatible distro: Oracle Linux offers a kernel with Btrfs.

Bcachefs, meanwhile, is relatively new and immature. It only appeared at the beginning of this year in kernel 6.7, meaning that it’s only been in three releases of the kernel so far. It’s a little bit too new for anyone else to support it just yet.

So, for now, Btrfs is the most mature file system in the Linux kernel that can do snapshots. This is why SUSE’s Snapper uses Btrfs by default, although it also supports LVM, and can be configured to use that instead.


Btrfs + Timeshift saved my broken Linux Mint

  • archonet@lemy.lol
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    3 months ago

    honestly, Timeshift + btrfs was a big part of the reason I was willing to try switching to Mint from Windows in February when I read about it (the other big part being Proton and my experience with my Steam Deck), and I’ve been rather happy with it since. I still dual boot for the odd thing, but 90% of the time I’m in Linux and it just works; and on the single occasion I’ve had an update bork something, I just used Timeshift to restore a snapshot, tried updating again, and it worked fine the second time. Took me 10 minutes. I remember the heady days of the early 2010s when I first tried Linux, and that would’ve normally kicked off an entire evening’s worth of troubleshooting. (And, indeed, it was shit like that that pushed me back to Windows whenever I’d try Linux)

    I’m really hoping more semi-computer-literate people start taking the plunge, it isn’t nearly so awful an adjustment to make as it was just ten years ago and Microsoft clearly needs the competition to encourage them to make not-shit products. I still wouldn’t give a Linux machine to your grandmother, but your average technically competent nerd who can use Google can actually use Mint nowadays without having to fuck with it too much; as opposed to having to almost become an expert on Linux and get up into its guts to make it work right for you (which, Windows is increasingly requiring itself, if you don’t want Microsoft knowing everything you do and serving you ads in your OS), and Timeshift is a big part of why, IMO. It’s not quite there to “perfectly suited for general use by your average idiot”, plenty of programs that don’t yet play nice with it; but it’s so much closer to that ideal now than it’s ever been before, and it’s still getting better.

    I know, wrong community, y’all like to get up into its guts, poke around and tinker; but I and many others would rather work on our computers, as opposed to work on our computers, if you get my meaning.