https://github.com/axrona/btrfs-rollback
Btrfs rollback tool written in Go for Arch-based distributions
https://github.com/axrona/btrfs-rollback
arch arch-linux archlinux btrfs btrfs-rollback btrfs-snapshots cli filesystem fstools go golang linux rollback snapper snapper-rollback snapshot
Last synced: 7 months ago
JSON representation
Btrfs rollback tool written in Go for Arch-based distributions
- Host: GitHub
- URL: https://github.com/axrona/btrfs-rollback
- Owner: axrona
- License: gpl-3.0
- Created: 2025-08-08T08:52:45.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-08-25T10:34:17.000Z (7 months ago)
- Last Synced: 2025-08-25T10:43:03.540Z (7 months ago)
- Topics: arch, arch-linux, archlinux, btrfs, btrfs-rollback, btrfs-snapshots, cli, filesystem, fstools, go, golang, linux, rollback, snapper, snapper-rollback, snapshot
- Language: Go
- Homepage:
- Size: 29.3 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# btrfs-rollback
Btrfs rollback tool written in Go for Arch-based distributions.
> [!WARNING]
> This tool is designed to be used in a live environment, such as a live USB or a booted snapshot. **Do not use this tool on your primary system without understanding the consequences.** Running it on the wrong system or environment may result in critical data loss or system instability.
## ⚙️ Configuration
By default, the config file is located at `/etc/btrfs-rollback.toml`:
```toml
# Name of your root subvolume (usually "@")
subvol_main = "@"
# Name of the subvolume where snapshots are stored
subvol_snapshots = "@snapshots"
# Temporary directory where the Btrfs root will be mounted
mountpoint = "/btrfs"
# Path to the Btrfs device. Required only if auto-mounting is needed
dev = "/dev/sda2"
```
Make sure to adjust the configuration to reflect your system's Btrfs setup and the live environment you are working in.
## 🛠️ Installation
### Install via `yay` (AUR):
```bash
yay -S btrfs-rollback
```
This will install the tool from the AUR. Alternatively, you can manually build and install it by cloning the repository and running the following commands:
```bash
git clone https://github.com/xeyossr/btrfs-rollback.git
cd btrfs-rollback
go build .
sudo install -Dm755 btrfs-rollback /usr/bin/btrfs-rollback
```
## 🚀 Usage
1. **Run the tool:** Once installed, you can run the btrfs-rollback tool directly from the command line.
```bash
btrfs-rollback
```
2. **Follow the prompts:** The tool will show a list of available snapshots and allow you to select one for rollback.
## 📜 License
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
For more details, see the [LICENSE](LICENSE) file.