From 3d700de1db1b5f320a0dcbdd1afd6c4c778bbcfe Mon Sep 17 00:00:00 2001 From: Jarno Rankinen <50285623+0ranki@users.noreply.github.com> Date: Fri, 7 Aug 2020 11:31:12 +0300 Subject: [PATCH] Update README.md Added instructions for enabling post-rollback cleanup systemd-unit. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 35403ab..1171e02 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Btrfs snapshot managing bash script - 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. - 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. ### Planned features: