Separate config file, rollback cleanup systemd-unit #15

Merged
jarno merged 4 commits from config-file into master 2020-08-07 11:32:13 +03:00
1 changed files with 1 additions and 0 deletions
Showing only changes of commit dd9fefd6c4 - Show all commits

View File

@ -14,6 +14,7 @@ Btrfs snapshot managing bash script
- Snapshots can be listed with `snapsh -l` or `snapsh --list` - Snapshots can be listed with `snapsh -l` or `snapsh --list`
- Delete snapshots with the `-r` or `--remove` option. List snapshots first with `snapsh -l`, then delete snapshot with e.g. `snapsh -r 2`, where 2 is the number of the deletable snapshot in the `-l` listing. The list numbers always start from 1 and increment from there, so always check the number before deletion. Batch deletion might be implemented later. - Delete snapshots with the `-r` or `--remove` option. List snapshots first with `snapsh -l`, then delete snapshot with e.g. `snapsh -r 2`, where 2 is the number of the deletable snapshot in the `-l` listing. The list numbers always start from 1 and increment from there, so always check the number before deletion. Batch deletion might be implemented later.
- Rollback to a snapshot with `snapsh --rollback NUMBER`, where NUMBER is the number listed in `snapsh -l`. The subvolume will be detected from the snapshot. E.g. `snapsh --rollback 14`. Script will ask to reboot system once done. - Rollback to a snapshot with `snapsh --rollback NUMBER`, where NUMBER is the number listed in `snapsh -l`. The subvolume will be detected from the snapshot. E.g. `snapsh --rollback 14`. Script will ask to reboot system once done.
- Rollback renames your currently active subvolume to SUBVOLUME.backup, if you want these backups to be deleted automatically, copy the included `snapsh-post-rollback.service` to `/etc/systemd/system` and `systemctl enable snapsh-post-rollback.service`. It will check if `*.backup` subvolumes exist and delete them on every boot. This is recommended to be enabled, since rollbacks also take a "regular" readonly snapshot as `SUBVOLUME_backup_YYYY.MM.DD-hh:mm:ss`. The unit will be enabled automatically with the `--install` option which will be done later.
- Snapshot type displayed in listing can be set with the `-t, --type` option. When used in conjunction with `-l | --list`, it will filter the results based on the type. E.g. `snapsh -l -t manual` will list all the snapshots with the type `manual`. Type can be one of `manual, auto, boot` or `backup`. Note that only `manual` and `backup` are implemented properly at this stage, but you can still use the other types as well. - Snapshot type displayed in listing can be set with the `-t, --type` option. When used in conjunction with `-l | --list`, it will filter the results based on the type. E.g. `snapsh -l -t manual` will list all the snapshots with the type `manual`. Type can be one of `manual, auto, boot` or `backup`. Note that only `manual` and `backup` are implemented properly at this stage, but you can still use the other types as well.
### Planned features: ### Planned features: