I have two machines in different site. Two machine have FreeBSD and ZFS volume. One is master. and other one is backup.
I usually do a backup by this command that invoked by cron.
zfs send -i pool/vol@old pool/vol@new | ssh backup zfs recv pool/vol
But the snapshot is quite large. It needs over 24 hours, and sometime it lost the connection. If that was happen I need to re-send it first byte.
Is there any way to reconnect the ssh connection without brake pipe?
For example, I can imagine the command chunked_send and chunked_recv.
zfs send -i pool/vol@old pool/vol@new | chunked_send id1 ssh backup chunked_recv id1 zfs recv pool/vol
One naive solution is use temporary file and rsync.
zfs send -i vol@old vol@new | split -b 1024m backup-tmp. rsync backup-tmp.* backup:/tmp ssh backup 'cat /tmp/backup-tmp.* | zfs recv vol'
I feel this is not smart.