Disk network backup

On the target:

read ip
read port
read path
# nc -l "$ip" "$port" | dd of="$path" bs=16M
{
  nc -l "$ip" "$port" | tee /dev/fd/3 | sudo dd of="$path" bs=16M
} 3>&1 | sha256sum > "$path.sha256sum"

On the source:

read dev
read ip
read port
# dd if="$dev" bs=16M status=progress | nc "$ip" "$port"
{
  sudo dd if="$dev" bs=16M status=progress | tee /dev/fd/3 | nc "$ip" "$port"
} 3>&1 | sha256sum