https://github.com/adonespitogo/node-snapback
A tool for listing and rolling back snapper btrfs snapshots including the EFI directory.
https://github.com/adonespitogo/node-snapback
btrfs snapper snapper-rollback
Last synced: 10 months ago
JSON representation
A tool for listing and rolling back snapper btrfs snapshots including the EFI directory.
- Host: GitHub
- URL: https://github.com/adonespitogo/node-snapback
- Owner: adonespitogo
- License: mit
- Created: 2023-05-08T08:58:21.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-26T12:49:41.000Z (almost 3 years ago)
- Last Synced: 2025-08-08T13:13:46.329Z (11 months ago)
- Topics: btrfs, snapper, snapper-rollback
- Language: JavaScript
- Homepage:
- Size: 41 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-snapback
A tool for listing and rolling back snapper btrfs snapshots, including `/boot` EFI directory.
## System Requirements:
- NodeJs
- [snapper](https://wiki.archlinux.org/title/snapper)
- [snapper-rollback](https://aur.archlinux.org/packages/snapper-rollback)
- a user with `sudo` access
## Install
`npm i -g @adonesp/snapbackjs`
## Usage
Install pacman hook scripts:
```
sudo snapback install
```
It will install the pacman hooks which will automatically backup your `/boot` directory and create a btrfs snapshot everytime you install/update your kernel.
Each snapshot created by the pacman hook will have a description `Linux backup for [kernel version] => [backup directory]`.
List the snapshots in `/.snapshots`:
```
sudo snapback ls
```
Rollback to a snapshot:
```
sudo snapback num 123
```
Where `123` is the number of brtfs snapshot created by the pacman hook. This will also restore the corresponding EFI files in `/boot` directory.
## Commands
- `install` - to install the pacman hook scripts.
- `ls, list` - to list available snapshots in '/.snapshots' directory.
- `num [snapshot number]` - specify a snapshot number to rollback. For example: `snapback num 123`
- `v, -v, version, --version` - print the tool version
## License
[MIT License]('./LICENSE')