Solved ZFS - Capture logging while ZFS send | recv through pipe

Maybe a stupid question , but I try to see if I could learn something ;)

I do a zfs send snapshot | zfs recv backuptarget 1>logfile 2>&1
an get a duplicate line like
full send of storage/playgarden@Montag estimated size is 2,84G
full send of storage/playgarden@Montag estimated size is 2,84G


Now I can do a zfs send snapshot 1>logfile 2>&1 | zfs recv backup-target 1>logfile 2>&1
which sends the lines into the logfile, but also the snapshot will be "logged"
All other messages of my script I can capture, except this pipe.

I assume there is no "silent" mode for zfs send ?
 
Hey ! Good point ! I was not aware that the messages are out of the stderr ( instead the usual stdout) so
zfs send snapshot 2>logfile | zfs recv backup-target 2>logfile
works ! Great !
 
Back
Top