#!/usr/bin/env bash
#
# A zfs-send alias that creates a perfect clone with good defaults.
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# TODO: Do we want --backup ?
# We get --props automatically from --replicate
exec zfs send --compressed --replicate --large-block --embed --verbose "${@}"

# On zfs recv side, may want to pass `-s` to make the stream resumable.

# If the data is encrypted and you DONT want to decrypt it, pass the --raw flag on the send side
# You may need to remove --embed above for encrypted datasets (maybe only with --raw flag? very unsure)
# For unencrypted datasets, --raw will be equivalent to -Lec (large block, embed, compressed)
