Docs

Snapshots and rollback

Undo a bad update with Btrfs snapshots.

What is saved

Fiordland uses Btrfs and snapper. A snapshot is a frozen copy of the system, not your home folder. Snapshots are taken before and after every package change, and every hour (5 hourly, 7 daily, 2 weekly and 1 monthly are kept).

snapper -c root list

Undo an update while the system works

Find the snapshot pair for the bad update in the list (the pre and post numbers), then:

sudo snapper -c root undochange PRE..POST

Restart afterwards.

Roll back when the system does not boot

Booting a snapshot from the boot menu is not supported yet. First try the Arch kernel and safe graphics boot entries. If neither works, boot the USB stick and open a terminal:

  1. Find the partition

    lsblk -f

    Look for the btrfs one, for example /dev/nvme0n1p2.

  2. Mount it

    sudo mount -o subvolid=5 /dev/nvme0n1p2 /mnt
  3. Pick a snapshot

    sudo ls /mnt/@snapshots
    sudo cat /mnt/@snapshots/N/info.xml

    The file shows the date and what caused it.

  4. Swap it in

    sudo mv /mnt/@ /mnt/@broken
    sudo btrfs subvolume snapshot /mnt/@snapshots/N/snapshot /mnt/@
    sudo umount /mnt
  5. Restart

    Remove the stick. Once everything works, delete @broken the same way you mounted it. If a kernel update caused the problem, reinstall the kernels with sudo pacman -S linux-cachyos linux.