FreeBSD restartable send/receive over WAN

Dave Cottlehuber dch at skunkwerks.at
Wed Jun 14 05:45:55 UTC 2017


> On Wed, 14 Jun 2017, at 01:34, Shiva Bhanujan wrote:
> Hi Ronald,
> 
> thanks for the info.  I'm going to work w/ FreeBSD 11.0, as it has
> restartable send/receive.  the compressed send is desirable though.
> 
> Regards,
> Shivas

A while back I hacked up a self-restarting zfs send, using mbuffer,
which in my setup was faster than ssh. I can't recall if it can
terminate itself or not, but it did the job, transferring 350GB over the
Pacific Ocean migrating off servers.

- use shells/fish
- on source side

while true
    sudo zfs send -Levt \
        (ssh -p 2200 root at 10.144.157.90 zfs get -Hpo value
        receive_resume_token zroot/shared/got) \
        | mbuffer -4 -s 128k -m 1G -O 10.144.157.90:9000  
end

- on sink side

while true
    mbuffer -4 -s 128k -m 1G -I 9000 \
        | zfs recv -Fuvs zroot/shared/got 
end

NB there's no encryption (security/hpenc is an excellent choice), or
replace mbuffer with spiped.

NNB https://gist.github.com/dch/26f2c660fee145c24ffc79126e9cbb21 is the
pretty version.

I'd love to hear back wrt perfomance/throughput.

A+
Dave


More information about the freebsd-fs mailing list