[フレーム]
Last Updated: February 25, 2016
·
4.698K
· datasaur

Monitor zfs send and receive (with parallel compression)

Use pipe viewer to monitor progress of a zfs send operation. Parallelizing compression via pigz can significantly reduce run time:

zfs send 1ドル | pv -c -s $(zfs send -RnP 1ドル 2>&1 | awk '{if (1ドル == "size") {print 2ドル}}') | pigz -c > 2ドル.zfs.gz

pv 1ドル | unpigz -c | zfs receive 2ドル

2 Responses
Add your response

Can we get a little more detail on what this script is doing ? the 1ドル variable are part of a different input with the ZFS snapshot ?

over 1 year ago ·

If put in a shell script, 1ドル is the name of the ZFS snapshot to send, and 2ドル is the name of the filename the compressed snapshot is stored in (the first and second args passed to the script).

over 1 year ago ·

AltStyle によって変換されたページ (->オリジナル) /