diff --git a/backup.sh b/backup.sh index e764cee..2ca985a 100755 --- a/backup.sh +++ b/backup.sh @@ -66,14 +66,24 @@ get_latest_snapshot() setup_aggregator() { create_datasets - zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT} + if [ $BG_TEST_MODE = "TRUE" ]; then + echo zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT} + else + zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT} + fi } setup_mirror() { - zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT} - zfs allow -u ${BG_USER} \ - compression,mountpoint,receive,create,mount ${BG_ROOT} + if [ $BG_TEST_MODE = "TRUE" ]; then + echo zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT} + echo zfs allow -u ${BG_USER} \ + compression,mountpoint,receive,create,mount ${BG_ROOT} + else + zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT} + zfs allow -u ${BG_USER} \ + compression,mountpoint,receive,create,mount ${BG_ROOT} + fi } create_snapshot()