oetiker / znapzend

zfs backup with remote capabilities and mbuffer integration.
www.znapzend.org
GNU General Public License v3.0
613 stars 137 forks source link

Is this an intended snapshot feature? #346

Closed monkiki closed 3 years ago

monkiki commented 6 years ago

According to these created snapshots, if two or more times the znapsend utility is executed in the same day, two snapshots are created for the same day (look at the second and third run). I don't understand why two snapshots are neccesary, but I suppose the first is the one which represents the corresponding daily snashot, and the second the "I don't know why snapshot" because this latest should be purged. In fact, this latest snapshot is purged the next day and you only get one snapshot per day, which is the expected behaviour.

NOTE: SRC and DST plan are both the same: 30days=>1day and recursive is on.

REMOTE SERVER

First run

zfs-pool/containers zfs-pool/containers@2018-05-04-213802 zfs-pool/containers/test0 zfs-pool/containers/test0@2018-05-04-213802 zfs-pool/containers/test1 zfs-pool/containers/test1@2018-05-04-213802

Second run (same day)

zfs-pool/containers/test0 zfs-pool/containers/test0@2018-05-04-213802 zfs-pool/containers/test0@2018-05-04-220801 zfs-pool/containers/test1 zfs-pool/containers/test1@2018-05-04-213802 zfs-pool/containers/test1@2018-05-04-220801

Third run (same day)

zfs-pool/containers/test0 zfs-pool/containers/test0@2018-05-04-213802 zfs-pool/containers/test0@2018-05-04-221334 zfs-pool/containers/test1 zfs-pool/containers/test1@2018-05-04-213802 zfs-pool/containers/test1@2018-05-04-221334

Fourth run (next day)

zfs-pool/containers zfs-pool/containers@2018-05-04-213802 zfs-pool/containers@2018-05-05-110340 zfs-pool/containers/test0 zfs-pool/containers/test0@2018-05-04-213802 zfs-pool/containers/test0@2018-05-05-110340 zfs-pool/containers/test1 zfs-pool/containers/test1@2018-05-04-213802 zfs-pool/containers/test1@2018-05-05-110340

BACKUP SERVER

First run

zfs-pool/znap/remote zfs-pool/znap/remote@2018-05-04-213802 zfs-pool/znap/remote/test0 zfs-pool/znap/remote/test0@2018-05-04-213802 zfs-pool/znap/remote/test1 zfs-pool/znap/remote/test1@2018-05-04-213802

Second run (same day)

zfs-pool/znap/remote zfs-pool/znap/remote@2018-05-04-213802 zfs-pool/znap/remote@2018-05-04-220801 zfs-pool/znap/remote/test0 zfs-pool/znap/remote/test0@2018-05-04-213802 zfs-pool/znap/remote/test0@2018-05-04-220801 zfs-pool/znap/remote/test1 zfs-pool/znap/remote/test1@2018-05-04-213802 zfs-pool/znap/remote/test1@2018-05-04-220801

Third run (same day)

zfs-pool/znap/remote zfs-pool/znap/remote@2018-05-04-213802 zfs-pool/znap/remote@2018-05-04-221157 zfs-pool/znap/remote/test0 zfs-pool/znap/remote/test0@2018-05-04-213802 zfs-pool/znap/remote/test0@2018-05-04-221334 zfs-pool/znap/remote/test1 zfs-pool/znap/remote/test1@2018-05-04-213802 zfs-pool/znap/remote/test1@2018-05-04-221334

Fourth run (next day)

zfs-pool/znap/remote zfs-pool/znap/remote@2018-05-04-213802 zfs-pool/znap/remote@2018-05-05-110340 zfs-pool/znap/remote/test0 zfs-pool/znap/remote/test0@2018-05-04-213802 zfs-pool/znap/remote/test0@2018-05-05-110340 zfs-pool/znap/remote/test1 zfs-pool/znap/remote/test1@2018-05-04-213802 zfs-pool/znap/remote/test1@2018-05-05-110340

oetiker commented 6 years ago

well the intention is to err on the side of caution ... effects as you are seeing them have not been a concern while designing the algorithm ... but if you find improvements, by all means, PR!

monkiki commented 6 years ago

:+1:

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.