Snapshot "snap-sync backup in progress" to be deleted after completion?
cmonty14 opened this issue · comments
Hi,
I have this list of snapshots on my server:
vlccirax:~ # snapper -c root list
Type | # | Pre # | Date | User | Cleanup | Description | Userdata
-------+-----+-------+--------------------------+------+---------+-----------------------------------------+----------------------------------------------------------------------------
single | 0 | | | root | | current |
single | 1 | | Fri Mar 15 10:32:23 2019 | root | | first root filesystem |
single | 2 | | Fri Mar 15 10:39:15 2019 | root | number | after installation | important=yes
pre | 27 | | Tue May 12 10:13:28 2020 | root | number | zypp(zypper) | important=yes
post | 28 | 27 | Tue May 12 10:17:25 2020 | root | number | | important=yes
pre | 73 | | Tue May 12 11:40:12 2020 | root | number | before online migration | important=yes
post | 74 | 73 | Tue May 12 11:46:53 2020 | root | number | after online migration | important=yes
pre | 180 | | Tue Jul 7 09:45:48 2020 | root | number | zypp(zypper) | important=yes
post | 181 | 180 | Tue Jul 7 09:46:38 2020 | root | number | | important=yes
single | 188 | | Tue Jul 14 00:00:01 2020 | root | number | old snap-sync snapshot (you may remove) |
single | 189 | | Mon Jul 27 00:00:03 2020 | root | | snap-sync backup in progress |
single | 190 | | Mon Aug 3 00:00:04 2020 | root | | snap-sync backup in progress |
single | 191 | | Mon Aug 10 00:00:03 2020 | root | | snap-sync backup in progress |
single | 192 | | Mon Aug 17 00:00:02 2020 | root | | snap-sync backup in progress |
single | 193 | | Mon Aug 24 00:00:03 2020 | root | | snap-sync backup in progress |
single | 194 | | Mon Aug 31 00:00:02 2020 | root | | snap-sync backup in progress |
single | 195 | | Mon Sep 7 00:00:03 2020 | root | | snap-sync backup in progress |
single | 196 | | Mon Sep 14 00:00:03 2020 | root | | snap-sync backup in progress |
single | 197 | | Mon Sep 21 00:00:04 2020 | root | number | old snap-sync snapshot (you may remove) |
single | 198 | | Mon Sep 28 00:00:04 2020 | root | number | old snap-sync snapshot (you may remove) |
single | 199 | | Mon Oct 5 00:00:04 2020 | root | | latest incremental backup | backupdir=vlccirax, subvolid=257, uuid=d3a0bde3-5c52-43a1-9786-a4f0a5db3c3d
Is my understanding correct that any snapshot with description "snap-sync backup in progress" should be deleted after a successful sent to backup location?
If yes, this code
snapper -c $x delete $(snapper -c $x list | awk '/'$name' backup in progress/ {print $1}')
should not work because snapper delete <number>
.
snapper -c $x delete $(snapper -c $x list | awk '/'$name' backup in progress/ {print $3}')
should work, though.
The fact that you have these snapshots means that the backup was interrupted. But it looks like you have successfully backed up since then, so they could be removed.