zfs send <-> recv iniciated by the receiver

andy77

Renowned Member
Jul 6, 2016
248
14
83
41
Hello@all, I would like to do a

Code:
root@sendserver:~# zfs send rpool/data/vm-100-disk-0 | ssh recvserver zfs recv rpool/data/vm-100-disk-0

But i need to run that from the receiver site, so I tried

Code:
root@recserver:~# zfs recv rpool/data/vm-100-disk-0 | ssh sendserver zfs send rpool/data/vm-100-disk-0

But this seems to not work. Any Idea if this is possible at all?

Thx for any advice
 
Hi,

Code:
ssh <user>@<hostip> -o 'BatchMode=yes' -- zfs send rpool/data/vm-100-disk-0 | ssh recvserver zfs recv rpool/data/vm-100-disk-0
 
Hi Wolfgang, thx for the answer. I think this will not work, because I forgot to mention something.

I need to run the transfer from the recvserver because it is not reachable directly from the sendserver.

sendserver = pubilcIP
recvserver = only internal ip with access to internet via router
 
This work, try it and you will see.
 
Wolfgang you are totaly right. This seems to really work. THX very much for that!!

Used like that and works like a charm:
Code:
ssh <user>@<hostip> -o 'BatchMode=yes' -- zfs send rpool/data/vm-100-disk-0 | pv | ssh recvserver zfs recv rpool/data/vm-100-disk-0
 
use verbose '-v' of receive