Please describe what you are doing to trigger the bug:
Running prune -keep 1:1
on snapshot with multiple revisions during the day keeps the oldest revision. Loses all changes between oldest and youngest revisions.
This may happen with other -keep
options. I have only seen it with -keep 1:1
.
Please describe what you expect to happen (but doesn’t):
Would expect it to keep the youngest revision to preserve the changes that occurred during the day.
Please describe what actually happens (the wrong behaviour):
Hourly backup, prune and check (in that order). Got 24 revisions for the day.
I would expect revision 32 to have been kept as it encompasses all changes for that day. Instead revision 12 was kept.
11:00 pm:
2019-09-07 23:00:24.992 INFO SNAPSHOT_CHECK
snap | rev | | files | bytes | chunks | bytes | uniq | bytes | new | bytes |
test-snap | 12 | @ 2019-09-07 00:00 | 6609 | 28,670M | 5723 | 27,532M | 3 | 1,692K | 70 | 223,587K |
test-snap | 13 | @ 2019-09-07 01:00 | 6612 | 28,670M | 5724 | 27,532M | 3 | 1,692K | 4 | 1,738K |
test-snap | 14 | @ 2019-09-07 02:00 | 6615 | 28,670M | 5725 | 27,532M | 3 | 1,693K | 4 | 1,739K |
test-snap | 15 | @ 2019-09-07 03:00 | 6618 | 28,670M | 5726 | 27,532M | 3 | 1,693K | 4 | 1,739K |
test-snap | 16 | @ 2019-09-07 04:00 | 6621 | 28,670M | 5727 | 27,532M | 3 | 1,693K | 4 | 1,740K |
test-snap | 17 | @ 2019-09-07 05:00 | 6624 | 28,670M | 5728 | 27,532M | 3 | 1,694K | 4 | 1,741K |
test-snap | 18 | @ 2019-09-07 06:00 | 6627 | 28,670M | 5729 | 27,532M | 3 | 1,694K | 4 | 1,741K |
test-snap | 19 | @ 2019-09-07 07:00 | 6630 | 28,670M | 5730 | 27,532M | 3 | 1,694K | 4 | 1,742K |
test-snap | 20 | @ 2019-09-07 08:00 | 6633 | 28,670M | 5731 | 27,532M | 3 | 1,695K | 4 | 1,743K |
test-snap | 21 | @ 2019-09-07 09:00 | 6640 | 28,670M | 5732 | 27,532M | 3 | 1,695K | 4 | 1,752K |
test-snap | 22 | @ 2019-09-07 10:00 | 6645 | 28,670M | 5732 | 27,532M | 3 | 1,696K | 5 | 2,422K |
test-snap | 23 | @ 2019-09-07 11:00 | 6648 | 28,670M | 5733 | 27,532M | 3 | 1,696K | 4 | 1,748K |
test-snap | 24 | @ 2019-09-07 12:00 | 6651 | 28,670M | 5734 | 27,532M | 3 | 1,696K | 5 | 2,415K |
test-snap | 25 | @ 2019-09-07 13:00 | 6654 | 28,670M | 5735 | 27,533M | 3 | 1,697K | 4 | 1,749K |
test-snap | 26 | @ 2019-09-07 14:00 | 6657 | 28,671M | 5736 | 27,533M | 3 | 1,697K | 4 | 1,750K |
test-snap | 27 | @ 2019-09-07 15:00 | 6659 | 28,675M | 5740 | 27,536M | 4 | 1,994K | 35 | 87,382K |
test-snap | 28 | @ 2019-09-07 18:00 | 6671 | 28,675M | 5740 | 27,536M | 3 | 1,995K | 4 | 2,100K |
test-snap | 29 | @ 2019-09-07 19:00 | 6674 | 28,675M | 5741 | 27,536M | 3 | 1,995K | 4 | 2,054K |
test-snap | 30 | @ 2019-09-07 21:00 | 6680 | 28,675M | 5742 | 27,537M | 3 | 1,996K | 5 | 2,429K |
test-snap | 31 | @ 2019-09-07 22:00 | 6683 | 28,675M | 5743 | 27,537M | 3 | 1,996K | 4 | 2,057K |
test-snap | 32 | @ 2019-09-07 23:00 | 6686 | 28,675M | 5744 | 27,537M | 5 | 2,427K | 5 | 2,427K |
Midnight:
2019-09-08 00:00:25.850 INFO SNAPSHOT_CHECK
snap | rev | | files | bytes | chunks | bytes | uniq | bytes | new | bytes |
test-snap | 12 | @ 2019-09-07 00:00 | 6609 | 28,670M | 5723 | 27,532M | 5 | 2,304K | 70 | 223,587K |
Prune:
Options: [-log prune -storage test -keep 7:30 -keep 1:1 -a]
2019-09-08 00:00:07.404 INFO STORAGE_SET Storage set to /path/to/storage
2019-09-08 00:00:08.415 INFO RETENTION_POLICY Keep 1 snapshot every 7 day(s) if older than 30 day(s)
2019-09-08 00:00:08.415 INFO RETENTION_POLICY Keep 1 snapshot every 1 day(s) if older than 1 day(s)
2019-09-08 00:00:08.969 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 13
2019-09-08 00:00:09.009 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 14
2019-09-08 00:00:09.039 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 15
2019-09-08 00:00:09.068 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 16
2019-09-08 00:00:09.100 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 17
2019-09-08 00:00:09.126 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 18
2019-09-08 00:00:09.155 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 19
2019-09-08 00:00:09.183 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 20
2019-09-08 00:00:09.212 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 21
2019-09-08 00:00:09.245 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 22
2019-09-08 00:00:09.273 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 23
2019-09-08 00:00:09.300 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 24
2019-09-08 00:00:09.328 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 25
2019-09-08 00:00:09.355 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 26
2019-09-08 00:00:09.384 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 27
2019-09-08 00:00:09.414 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 28
2019-09-08 00:00:09.444 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 29
2019-09-08 00:00:09.474 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 30
2019-09-08 00:00:09.505 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 31
2019-09-08 00:00:09.532 INFO SNAPSHOT_DELETE Deleting snapshot test-snap at revision 32