Jump to content

Snapshots: Difference between revisions

From Fiordland Wiki
Initial version
 
Sync from repo
 
Line 14: Line 14:


== Roll back when the system does not boot ==
== Roll back when the system does not boot ==
<div class="fl-warn">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.</div>
# Restart. In the boot menu, open '''Fiordland snapshots''' and pick one from before the problem. Each entry shows the date and what caused it (for example <code>pacman -Syu</code>).
# The system starts from that snapshot. Changes made now are kept in memory only and are lost at the next restart.
# If it works, make it permanent:
#: <code>sudo fiordland-rollback</code>
# Restart. Fiordland now starts from the restored system.
# Once everything works, free the space used by the old system: <code>sudo fiordland-rollback --clean</code>


First try the other boot entries: '''Arch kernel''' and '''safe graphics'''. If neither works:
Each snapshot includes its own kernel, so rolling back also undoes a bad kernel update. Your home folder is never touched.
 
To restore a snapshot without booting it first, use its number from <code>fiordland-rollback --list</code>:
<pre>sudo fiordland-rollback 42</pre>
 
== Installs from before 23 November 2026 ==
Older installs use systemd-boot and keep the kernel on the boot partition, so the snapshot menu is not available. Use the steps below instead.


# Boot the Fiordland USB stick and open a terminal.
# Boot the Fiordland USB stick and open a terminal.
Line 27: Line 38:
#: <code>sudo btrfs subvolume snapshot /mnt/@snapshots/N/snapshot /mnt/@</code>
#: <code>sudo btrfs subvolume snapshot /mnt/@snapshots/N/snapshot /mnt/@</code>
# <code>sudo umount /mnt</code> and reboot.
# <code>sudo umount /mnt</code> and reboot.
# Once everything works, delete the old copy: <code>sudo btrfs subvolume delete /@broken</code> after mounting with <code>subvolid=5</code> again.
# If a kernel update caused the problem, reinstall the kernels: <code>sudo pacman -S linux-cachyos linux</code>.
 
The kernel files live on the separate boot partition. If the problem came from a kernel update, reinstall the kernel after rolling back: <code>sudo pacman -S linux-cachyos linux</code>.


[[Category:Guides]]
[[Category:Guides]]

Latest revision as of 11:10, 23 November 2026

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

  1. Restart. In the boot menu, open Fiordland snapshots and pick one from before the problem. Each entry shows the date and what caused it (for example pacman -Syu).
  2. The system starts from that snapshot. Changes made now are kept in memory only and are lost at the next restart.
  3. If it works, make it permanent:
    sudo fiordland-rollback
  4. Restart. Fiordland now starts from the restored system.
  5. Once everything works, free the space used by the old system: sudo fiordland-rollback --clean

Each snapshot includes its own kernel, so rolling back also undoes a bad kernel update. Your home folder is never touched.

To restore a snapshot without booting it first, use its number from fiordland-rollback --list:

sudo fiordland-rollback 42

Installs from before 23 November 2026

Older installs use systemd-boot and keep the kernel on the boot partition, so the snapshot menu is not available. Use the steps below instead.

  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. If a kernel update caused the problem, reinstall the kernels: sudo pacman -S linux-cachyos linux.