snappy-zfs-init 298 Bytes
Newer Older
Robert Ricci's avatar
Robert Ricci committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/bin/sh

ZFS=zfs
SRCVOL=$1
DSTVOL=$2

if ! [ ${1:+1} ]
then
    echo "ERROR: Need source volume"
    exit 1;
fi


if ! [ ${2:+1} ]
then
    echo "ERROR: Need destination volume"
    exit 1;
fi

zfs snapshot $SRCVOL@snappy-incremental-1 && zfs send $SRCVOL@snappy-incremental-1 | zfs recv $DSTVOL