Use netcat instead of SSH + monitor zfs send/receive

Status
Not open for further replies.

panz

Guru
Joined
May 24, 2013
Messages
556
I'm trying to manually zfs send/receive using nc instead of SSH (both servers are on a trusted network).

sending machine pool: tank
sending machine dataset: music
receiving machine pool: backup

So, my setup for the receiving server (IP 192.168.1.117) to listen for traffic, is:

nc -w 300 -l 5600 | zfs recv -Fduv backup

(first doubt: -w with -l probably ineffective...)

sending side (IP 192.168.1.116) CLI command (snapshot is @001):

zfs send -R tank/music@001 | nc -w 30 -v 192.168.1.117 5600

When the job is done, next command on the backup machine is:

zfs set readonly=on backup/music

1st question: I'd like to monitor zfs send/receive process by piping the send command to pv, like:

zfs send -R tank/music@001 | pv -i 10 | nc -w 30 -v 192.168.1.117 5600

but seems that pv is not available in FreeNAS.

2nd question: how do I quickly check that the zfs send/receive operation has completed without errors? Because, If I hit Ctrl+C on the receiving side (killing nc listening) I don't see any errors.

3rd question: how do I automatically kill the netcat listening process on the receiving machine? The -w switch seems sorting no effect.
 
Status
Not open for further replies.
Top