Open XueqiangDong opened 2 years ago
It's not "deleted", it's just that "btrbk list" command don't list the previous snapshots. If I use manual "ls /path/to/snapshots" canmand I can still find the snapshots. So I changed the title
"btrbk list" shows you how the subvolumes according to the config. Still, if nothing changed in the config, i.e. no diff in /mnt/linuxes/opensuse /mnt/linuxes/opensuse{,.bak}/etc/btrbk/btrbk.conf
btrbk should actually list the ones from /mnt/snapshots
.
If you want to list your btrfs subvolumes, try "lsbtr -l" (as of btrbk-0.30.0 I think, I always recommend using latest version). gives useful listing especially for disaster-recovery ;-)
not sure what "lsbtr -l" is and in my opensuse it says command not found. But it's fine this strange not listing issuse happens only on openSUSE, and not found in other distros (Debian, Arch, Fedaro). I can still list the btrbk backup snapshots with "sudo btrfs sub list /xxxx" and just not list by "btrbk -c /xxx.conf list" command for openSUSE. Nothing serious there.
Has linux on /mnt/linuxes/opensuse Has snapshots on /mnt/snapshots/opensuse/20220815T0000, 20220816T0000, 20220817T0000, 20220818T0000, 20220818T0100... Suppose met some problem of the current os and want to recovery to 20220817T0000:
Recovery form the backup snapshot sudo mv /mnt/linuxes/opensuse /mnt/linuxes/opensuse.bak sudo btrfs sub snapshot /mnt/snapshots/opensuse/20220817T0000 /mnt/linuxes/opensuse
And after reboot, after the cron job run of btrbk All the snapshots (/mnt/snapshots/opensuse/20220815T0000, 20220816T0000, 20220817T0000, 20220818T0000) will be deleted and btrbk will create the snapshot from the start of it's first run after recovery Fortunately the backup snapshots are still there and didn't be deleted