Maze Linux / Wiki

Snapshots & Rollback

Maze takes a btrfs snapshot automatically before and after every pacman transaction (via snap-pac). You do not need to remember to do it, and the snapper configuration is created for you.

Right after installing: no snapshots yet

A freshly installed system starts with an empty snapshot list — this is expected:

Want a known-good starting point right away? Take one by hand:

sudo snapper -c root create -d "fresh install"

Listing snapshots

sudo snapper -c root list

sudo is required — /.snapshots is readable by root only, so without it you get a "No permissions" error.

The first line, 0 current, is not a snapshot: it is the running system. That is why commands below compare against 0 ("now").

Graphical equivalent: Btrfs Assistant, in the application menu.

What a snapshot covers — and what it does not

Snapshots are taken of the root subvolume only. Some locations live on separate subvolumes or partitions on purpose, so rolling back never touches them:

LocationIn the snapshot?Why
/ — system files, /etc, /usrYesThis is what an update changes
/home — your files, shell history, app settingsNoRolling back the system must not lose your work
/var/logNoLogs of what went wrong stay available
/var/cacheNoPackage cache, not worth snapshotting
EFI partition — the signed kernel image (UKI)NoNot on btrfs

So after a rollback, a package you installed is gone again, but the changes it made inside your home directory (for example your shell history or config files) stay.

Undoing a single change

This is the common case: an update changed something and you want it back the way it was. First see what actually changed between snapshot 42 and now:

sudo snapper -c root status 42..0

Then undo it:

sudo snapper -c root undochange 42..0

Not across a kernel update. undochange restores everything in the root subvolume — including the kernel modules in /usr/lib/modules — but the kernel image itself lives on the EFI partition, which is not snapshotted. If the kernel was updated after snapshot 42, you would end up with old modules and a new kernel: no Wi-Fi, possibly no graphics. Check with the status command above; if /usr/lib/modules is in the list, use full system rollback instead, which checks for this.

Full system rollback

Returns the entire system to an earlier snapshot:

sudo maze-rollback                  # list snapshots you can return to
sudo maze-rollback 42               # return to snapshot 42

Setup: the installer prepares full rollback automatically. Only systems installed from an older ISO need a one-time step — running it on a current install just reports "Already set up":

sudo maze-enable-rollback           # shows what would change
sudo maze-enable-rollback --apply   # applies it

Known limitation: full system rollback is not yet reliable on every machine and is still being worked on. If you need to recover from a bad update today, snapper undochange (mind the kernel caveat above) or the recovery kernel are the safer routes.

What snapshots do not protect against

Snapshots live on the same disk as your system. They protect you from a bad update or a mistaken change — not from disk failure, theft, or an encrypted-disk password you have forgotten. Keep real backups on separate media for that.

See also: If the System Won't Boot · Updating