mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-25 05:05:05 +00:00
Added test mode for zfs allow commands.
This commit is contained in:
parent
f03bf1f547
commit
d57c9d2d52
18
backup.sh
18
backup.sh
@ -66,14 +66,24 @@ get_latest_snapshot()
|
|||||||
setup_aggregator()
|
setup_aggregator()
|
||||||
{
|
{
|
||||||
create_datasets
|
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()
|
setup_mirror()
|
||||||
{
|
{
|
||||||
zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT}
|
if [ $BG_TEST_MODE = "TRUE" ]; then
|
||||||
zfs allow -u ${BG_USER} \
|
echo zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT}
|
||||||
compression,mountpoint,receive,create,mount ${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()
|
create_snapshot()
|
||||||
|
Loading…
Reference in New Issue
Block a user