oetiker / znapzend

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

DST configuration local to snapshots #649

Open Harvie opened 1 month ago

Harvie commented 1 month ago

Hello, i have recently changed IP address of my DST_A, but for some reason, local snapshots already have org.znapzend:dst_a property copied localy, which really messed up my plan to simply switch to different ip address. I think this should be inherited, not set localy to each snapshot or dataset. Otherwise it causes problems when something changes regarding the DST configuration. eg. the snapshots were kept indefinitely. that is despite using --cleanOffline, which might be bug on its own.

# zfs get all tank/vps@2023-08-06-020000
...
tank/vps@2023-08-06-020000  org.znapzend:dst_a_synced   1                                       local
tank/vps@2023-08-06-020000  org.znapzend:dst_a          root@10.10.10.110:tank/node1/vps  local    <--- WHY IS THIS NOT INHERITED???
tank/vps@2023-08-06-020000  org.znapzend:mbuffer        /usr/bin/mbuffer                        inherited from tank
tank/vps@2023-08-06-020000  org.znapzend:mbuffer_size   1G                                      inherited from tank
tank/vps@2023-08-06-020000  org.znapzend:dst_a_plan     1hours=>15minutes,3days=>1hours         inherited from tank
tank/vps@2023-08-06-020000  org.znapzend:src_plan       1hours=>15minutes,3days=>1hours         inherited from tank
tank/vps@2023-08-06-020000  org.znapzend:post_znap_cmd  off                                     inherited from tank
tank/vps@2023-08-06-020000  org.znapzend:enabled        on                                      inherited from tank
tank/vps@2023-08-06-020000  org.znapzend:recursive      on                                      inherited from tank
tank/vps@2023-08-06-020000  org.znapzend:zend_delay     0                                       inherited from tank
tank/vps@2023-08-06-020000  org.znapzend:tsformat       %Y-%m-%d-%H%M%S                         inherited from tank
tank/vps@2023-08-06-020000  org.znapzend:pre_znap_cmd   off                                     inherited from tank

What do you think about this? is this a bug? how am is supposed to change dst_a without breaking things?

jimklimov commented 1 month ago

Well, they are snapshots - so refer to the values that were valid at the moment of their creation, and should be immutable afterwards. I don't think these are practically used by znapzend or anyone though - only the "local"-ly (not "received", and in many cases not "inherited", etc.) stored attributes in "live" datasets or volumes are what matters.