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
Written by Matt Keranen
Related protips
2 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Hybriddba
Authors
datasaur
30.96K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#