Skip to content
Search Fedora

    Browse this documentation

    Rollback guide: snapper snapshots, Btrfs, and upgrade self-rescue

    Leave yourself an exit before upgrading, and you can upgrade boldly. F45’s default layout is already prepared for rollback; this page covers all three mechanisms.

    SystemRollback mechanismSection
    btrfs install (Workstation default)snapper snapshotsbelow
    Atomic variants (Silverblue/Kinoite)rpm-ostree rollbackthe Atomic page
    ext4 installno system snapshots; backups onlythe last-resort section

    Confirm the filesystem:

    Terminal window
    findmnt -no FSTYPE /

    Measured: F45’s default install is btrfs.

    The default layout pre-provisions snapshots

    Section titled “The default layout pre-provisions snapshots”

    Measured btrfs subvolume list /:

    ID 257 ... path boot
    ID 258 ... path home
    ID 259 ... path var
    ID 261 ... path snapshots ← reserved for snapshots

    The snapshots subvolume exists because Anaconda plans for snapper from the start. Install it and create a config:

    Terminal window
    sudo dnf install -y snapper
    sudo snapper create-config /
    sudo snapper list

    Measured: create-config immediately records a current snapshot, and hourly timeline snapshots are already running (a timeline entry every hour).

    Terminal window
    sudo snapper create --description "before-upgrade" # manual snapshot
    sudo snapper list # measured output:
    # │ Type │ Pre # │ Date │ User │ Cleanup │ Description
    7 │ single │ │ Oct 29 13:05 │ root │ │ before-upgrade

    Deletion (measured):

    Terminal window
    sudo snapper delete 7

    Create a before-upgrade entry before upgrading so you have a restore point. Combined with the upgrade flow:

    Terminal window
    sudo snapper create --description "pre system-upgrade 45→46"
    sudo dnf system-upgrade download --releasever=46
    sudo dnf system-upgrade reboot # boot into the offline transaction
    Terminal window
    sudo snapper diff 6..7 /etc/nginx/nginx.conf # changes to one file between snapshots
    sudo snapper undo 6..7 # undo everything between them (careful)
    sudo snapper undochange 6..7 /etc/nginx/nginx.conf # restore a single file

    undochange is the workhorse: after an upgrade, roll back exactly the one broken config without touching anything else.

    Silverblue/Kinoite and every ostree system roll back natively:

    Terminal window
    rpm-ostree status # current and previous deployment
    rpm-ostree rollback # make the previous deployment default, reboot into it

    A failed upgrade looks like “the new deployment won’t boot” — pick the previous entry in the boot menu, enter the old system, then delete the failed deployment. No snapshots needed; the deployment model keeps two copies by design. Details on the Atomic page.

    Upgrade transaction logs live in the target system’s /var/lib/dnf/system-upgrade/. A power cut mid-upgrade resumes the offline transaction on reboot:

    Terminal window
    sudo dnf system-upgrade status # current offline transaction
    sudo dnf system-upgrade log # past transaction logs
    sudo dnf system-upgrade clean # discard the pending transaction (abort this upgrade)
    • ext4 has no btrfs snapshots; before upgrading, tar the whole /etc, save dnf history, and back up critical /home data
    • system won’t boot: chroot in from live media, dnf history undo last, or follow the troubleshooting page
    • truly unrecoverable: copy /home out from live media and reinstall — 45 minutes
    SymptomCause
    snapper create-config / errorsroot is not btrfs, or snapper not installed
    snapshots eating disktimeline retention is loose by default; tune TIMELINE_LIMIT_* or snapper delete
    service still broken after undochangeconfig rolled back but the process wasn’t restarted; systemctl restart it
    software gone after rpm-ostree rollbacklayered packages follow the deployment; use flatpak for those
    power cut during offline upgradereboot resumes automatically; check system-upgrade status