diff --git a/backup.sh b/backup.sh index 8b05e27..2db71ef 100644 --- a/backup.sh +++ b/backup.sh @@ -6,7 +6,7 @@ # # ... -### datasets.txt (Only required for aggregator setup.) +### datasets.txt # # / # / @@ -33,12 +33,16 @@ setup_aggregator() { zfs allow -u ${BR_USER} send,snapshot,hold ${BR_ROOT} for dataset in `cat datasets.txt`; do - zfs create $dataset + zfs create -p ${BR_ROOT}/$dataset done } setup_mirror() { + zfs create -p $BR_ROOT + for dataset in `cat datasets.txt`; do + zfs create -p ${BR_ROOT}/$dataset + done zfs allow -u ${BR_USER} send,snapshot,hold ${BR_ROOT} zfs allow -u ${BR_USER} \ compression,mountpoint,receive,create,mount ${BR_ROOT} @@ -52,7 +56,6 @@ create_snapshot() else zfs snapshot -r ${BR_ROOT}@${id} fi - } send_single_snapshot()