Jump to content

Snapshots

From Fiordland Wiki

Fiordland installs on Btrfs and takes automatic snapshots with snapper. A snapshot is a frozen copy of the system (not your home folder) at a point in time.

When snapshots are taken

  • Before and after every package install, removal or update (snap-pac).
  • Every hour, kept as: 5 hourly, 7 daily, 2 weekly, 1 monthly.

List them:

snapper -c root list

Undo a change while the system still boots

Find the "pre" snapshot number from before the bad update, then:

sudo snapper -c root undochange PRE..POST

Reboot afterwards.

Roll back when the system does not boot

Booting straight into a snapshot from the boot menu is not supported yet. This is planned for Fiordland 1. Until then, use the steps below.

First try the other boot entries: Arch kernel and safe graphics. If neither works:

  1. Boot the Fiordland USB stick and open a terminal.
  2. Find your Fiordland partition: lsblk -f (the Btrfs one, for example /dev/nvme0n1p2).
  3. Mount the top of the filesystem:
    sudo mount -o subvolid=5 /dev/nvme0n1p2 /mnt
  4. Pick a snapshot: sudo ls /mnt/@snapshots and check sudo cat /mnt/@snapshots/N/info.xml for its date.
  5. Move the broken system aside and restore the snapshot:
    sudo mv /mnt/@ /mnt/@broken
    sudo btrfs subvolume snapshot /mnt/@snapshots/N/snapshot /mnt/@
  6. sudo umount /mnt and reboot.
  7. Once everything works, delete the old copy: sudo btrfs subvolume delete /@broken after mounting with subvolid=5 again.

The kernel files live on the separate boot partition. If the problem came from a kernel update, reinstall the kernel after rolling back: sudo pacman -S linux-cachyos linux.