mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-25 05:55:06 +00:00
Added test mode for zfs allow commands.
This commit is contained in:
parent
f03bf1f547
commit
d57c9d2d52
10
backup.sh
10
backup.sh
@ -66,14 +66,24 @@ get_latest_snapshot()
|
||||
setup_aggregator()
|
||||
{
|
||||
create_datasets
|
||||
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()
|
||||
{
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user