Snapshots: Difference between revisions
Appearance
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 == | ||
< | # 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> | |||
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. | ||
# | # If a kernel update caused the problem, reinstall the kernels: <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
- 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). - 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:
sudo fiordland-rollback
- Restart. Fiordland now starts from the restored system.
- 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.
- Boot the Fiordland USB stick and open a terminal.
- Find your Fiordland partition:
lsblk -f(the Btrfs one, for example/dev/nvme0n1p2). - Mount the top of the filesystem:
sudo mount -o subvolid=5 /dev/nvme0n1p2 /mnt
- Pick a snapshot:
sudo ls /mnt/@snapshotsand checksudo cat /mnt/@snapshots/N/info.xmlfor its date. - Move the broken system aside and restore the snapshot:
sudo mv /mnt/@ /mnt/@brokensudo btrfs subvolume snapshot /mnt/@snapshots/N/snapshot /mnt/@
sudo umount /mntand reboot.- If a kernel update caused the problem, reinstall the kernels:
sudo pacman -S linux-cachyos linux.