Skip to content

demorgon989/snapper-restore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔄 Snapper Restore

A simple menu-driven bash script for Fedora KDE that lets you browse and restore Snapper btrfs snapshots without remembering any commands. Includes a clickable KDE desktop launcher with a custom icon.

Think of it as Windows System Restore for Fedora.


Features

  • Interactive terminal menu showing all available snapshots
  • Restores your system to any snapshot with a single confirmation
  • Automatically reboots after a successful rollback
  • Clickable KDE desktop launcher (no terminal needed to launch)
  • Protects itself with an immutable flag so it can't be accidentally deleted
  • Install script handles all setup including Snapper config if not already present
  • Clean uninstaller included

Requirements

  • Fedora 43+ (KDE Plasma)
  • btrfs root filesystem (default on modern Fedora installs)
  • Snapper (installed automatically if missing)

Installation

1. Clone the repo:

git clone https://github.com/demorgon989/snapper-restore.git
cd snapper-restore

2. Add your icon:

Place your icon file named restore-icon.png inside the icon/ folder before running the installer.

3. Run the installer:

sudo bash install.sh

The installer will:

  • Install Snapper and Btrfs Assistant if not already present
  • Set up Snapper configs for root and home if not already configured
  • Copy the script to your home directory and make it immutable
  • Install your icon to ~/.local/share/icons/
  • Create a KDE desktop launcher under System in your app launcher
  • Take an initial snapshot of your current system

Usage

From the app launcher

Search for Snapshot Restore in your KDE app launcher under System and click it.

From terminal

sudo bash ~/snapshot-restore.sh

What it looks like

  ╔══════════════════════════════════════════╗
  ║       SNAPPER SNAPSHOT RESTORE MENU      ║
  ╚══════════════════════════════════════════╝

Available ROOT snapshots:

 # │ Type   │ Date                            │ Description
 ──┼────────┼─────────────────────────────────┼──────────────────────
 0 │ single │                                 │ current
 1 │ single │ Sun 01 Mar 2026 09:29:47 AM EST │ Fresh stable install
 2 │ pre    │ Sun 01 Mar 2026 11:00:00 AM EST │ dnf update
 3 │ post   │ Sun 01 Mar 2026 11:00:01 AM EST │ dnf update

Enter the snapshot NUMBER you want to restore to:
(This will make it permanent and reboot your system)

  Snapshot #:

Enter the number, type YES to confirm, and the script handles the rest.


How Snapper Automatic Snapshots Work

Once installed, Snapper automatically takes a before and after snapshot every time you install, update, or remove software with DNF. So you always have a restore point before any system change.

You can view and manage snapshots anytime with:

sudo snapper -c root list

Or use Btrfs Assistant (installed automatically) for a graphical interface.


Uninstall

sudo bash uninstall.sh

This removes the script, icon, and desktop launcher. Your Snapper configs and existing snapshots are left untouched.


Why use this instead of Btrfs Assistant?

Btrfs Assistant is a great GUI tool and can do the same thing — if everything is working fine. This script exists for when things go wrong.

Scenario Btrfs Assistant Snapper Restore
KDE desktop won't load
Booted into read-only snapshot
Only a terminal is available (TTY/SSH)
No extra software installed
Non-technical user needs a restore
Normal desktop restore with GUI

The install script does also install Btrfs Assistant since it's useful for day to day snapshot management — but when your system is broken and you just need to get back to a working state fast, a simple terminal menu beats navigating a GUI every time.


License

MIT — see LICENSE

About

A menu-driven Snapper snapshot restore tool for Fedora KDE with a one-click desktop launcher

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages