A simple tool for openSUSE that automatically detects if you have booted into a BTRFS snapshot and prompts you to restore it. This application runs on boot and will allow you to quickly restore a snapshot with a simple "Yes/No" prompt.
- Automatically detects if the system has booted into a snapshot using
grep
on/proc/cmdline
. - Prompts the user to restore the snapshot with a confirmation message.
- Provides a graphical interface with a
Yes/No
prompt. - Works specifically for openSUSE systems with BTRFS snapshots.
- Runs the rollback command (
snapper rollback
) when the user accepts to restore the snapshot.
To install and set up the SnapshotRestorer
application, follow these steps:
- Clone this repository:
git clone https://github.com/silverhadch/SnapshotRestorer.git
- Navigate to the project directory:
cd SnapshotRestorer
- Execute the install script to build and install the application:
./install.sh
This will:
- Install the necessary dependencies automatically.
- Compile the
SnapshotRestorer
application. - Install the binary into
/usr/bin
. - Install the
.desktop
file into/usr/share/applications
. - And make an Systemwide Autostart.
Once installed, the application will automatically detect if the system is booted into a snapshot. If a snapshot is detected, you will be prompted with the option to restore it.
- Upon boot, if the system detects a snapshot, you will see a graphical prompt asking you whether you'd like to restore the snapshot.
- If you choose "Yes", the snapshot restore process will begin, and the snapshot will be rolled back using the
snapper rollback
command.
To uninstall the application, you can remove the binary and the .desktop
file manually:
sudo rm /usr/bin/SnapshotRestorer
sudo rm /usr/share/applications/snapper-boot-restorer.desktop
sudo rm /etc/xdg/autostart/snapper-boot-restorer.desktop
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for more details.
Feel free to fork this repository and contribute by submitting pull requests. If you encounter any bugs or have suggestions, please open an issue in the issue tracker.
- openSUSE: For providing a great platform to develop and test the tool.
- BTRFS: For providing snapshots as a way to protect data and simplify rollback functionality.
- Garuda Linux Snapper Tools: This project is inspired by Garuda Linux's Snapper Tools, which offer similar snapshot restore functionality when booting into snapshots.
If you have any questions or need help with the tool, feel free to open an issue in the repository, or reach out via the contact information in the issue tracker.