mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-22 17:05: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()
|
setup_aggregator()
|
||||||
{
|
{
|
||||||
create_datasets
|
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}
|
zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT}
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_mirror()
|
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} send,snapshot,hold ${BG_ROOT}
|
||||||
zfs allow -u ${BG_USER} \
|
zfs allow -u ${BG_USER} \
|
||||||
compression,mountpoint,receive,create,mount ${BG_ROOT}
|
compression,mountpoint,receive,create,mount ${BG_ROOT}
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
create_snapshot()
|
create_snapshot()
|
||||||
|
Loading…
Reference in New Issue
Block a user