mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-24 14:25:06 +00:00
Fix zfs create commands.
This commit is contained in:
parent
2fc0aca8fd
commit
126c331608
@ -6,7 +6,7 @@
|
|||||||
# <remote host 2 address> <host 2 ssh port> <host 2 root zfs>
|
# <remote host 2 address> <host 2 ssh port> <host 2 root zfs>
|
||||||
# ...
|
# ...
|
||||||
|
|
||||||
### datasets.txt (Only required for aggregator setup.)
|
### datasets.txt
|
||||||
# <dataset 1>
|
# <dataset 1>
|
||||||
# <dataset 1>/<dataset 1a>
|
# <dataset 1>/<dataset 1a>
|
||||||
# <dataset 1>/<dataset 1b>
|
# <dataset 1>/<dataset 1b>
|
||||||
@ -33,12 +33,16 @@ setup_aggregator()
|
|||||||
{
|
{
|
||||||
zfs allow -u ${BR_USER} send,snapshot,hold ${BR_ROOT}
|
zfs allow -u ${BR_USER} send,snapshot,hold ${BR_ROOT}
|
||||||
for dataset in `cat datasets.txt`; do
|
for dataset in `cat datasets.txt`; do
|
||||||
zfs create $dataset
|
zfs create -p ${BR_ROOT}/$dataset
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_mirror()
|
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} send,snapshot,hold ${BR_ROOT}
|
||||||
zfs allow -u ${BR_USER} \
|
zfs allow -u ${BR_USER} \
|
||||||
compression,mountpoint,receive,create,mount ${BR_ROOT}
|
compression,mountpoint,receive,create,mount ${BR_ROOT}
|
||||||
@ -52,7 +56,6 @@ create_snapshot()
|
|||||||
else
|
else
|
||||||
zfs snapshot -r ${BR_ROOT}@${id}
|
zfs snapshot -r ${BR_ROOT}@${id}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
send_single_snapshot()
|
send_single_snapshot()
|
||||||
|
Loading…
Reference in New Issue
Block a user