allanjude / zxfer

A continuation of development on zxfer, a popular script for managing ZFS snapshot replication
BSD 2-Clause "Simplified" License
123 stars 40 forks source link

Remove optimization which breaks local replication #43

Closed kpfleming closed 5 years ago

kpfleming commented 6 years ago

The optimization in get_zfs_list() which saved time when LZFS and RZFS are identical (meaning the source and target machines are local, or identical remotes) did not actually work. The snapshot list from the target machine was incorrect, resulting in zxfer believing it had to send the entire filesystem and all snapshots, even if a previous replication had sent them.

Removing the optimization resolves the issue; local-to-local replication now works as expected, incrementally sending new snapshots on each run. Remote replication should be unaffected except for the unusual case where the source and target remotes are the same system; in that case, the snapshot information gathering process will take slightly more time.

Resolves issue #42.