From 126c331608f9eb8de5b2ed2d524a119a7995ade4 Mon Sep 17 00:00:00 2001 From: Otho Date: Sun, 20 Nov 2022 20:15:43 -0500 Subject: [PATCH] Fix zfs create commands. --- backup.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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()