mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-22 04:25:06 +00:00
Fixed ordering of operations.
This commit is contained in:
parent
b5013414cb
commit
923fca5795
22
backup.sh
22
backup.sh
@ -33,7 +33,17 @@ MIRROR_PERMS="compression,receive,create,mount,mountpoint,readonly,jailed"
|
|||||||
|
|
||||||
SEND_DATASETS=""
|
SEND_DATASETS=""
|
||||||
SNAPSHOT_DATASETS=""
|
SNAPSHOT_DATASETS=""
|
||||||
while read dataset dataset_options; do
|
|
||||||
|
debug()
|
||||||
|
{
|
||||||
|
if [ $BG_DEBUG_MODE = "TRUE" ]; do
|
||||||
|
echo $@
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
populate_datasets()
|
||||||
|
{
|
||||||
|
while read dataset dataset_options; do
|
||||||
case $dataset in
|
case $dataset in
|
||||||
\#*) continue;;
|
\#*) continue;;
|
||||||
esac
|
esac
|
||||||
@ -56,13 +66,7 @@ while read dataset dataset_options; do
|
|||||||
if [ $snapshot_dataset ]; then
|
if [ $snapshot_dataset ]; then
|
||||||
SNAPSHOT_DATASETS="$SNAPSHOT_DATASETS $dataset"
|
SNAPSHOT_DATASETS="$SNAPSHOT_DATASETS $dataset"
|
||||||
fi
|
fi
|
||||||
done < datasets.txt
|
done < datasets.txt
|
||||||
|
|
||||||
debug()
|
|
||||||
{
|
|
||||||
if [ $BG_DEBUG_MODE = "TRUE" ]; do
|
|
||||||
echo $@
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
list_datasets()
|
list_datasets()
|
||||||
@ -258,6 +262,8 @@ done
|
|||||||
|
|
||||||
tail -n +2 $nodes_file|grep -v '^#' > sendnodes.tmp
|
tail -n +2 $nodes_file|grep -v '^#' > sendnodes.tmp
|
||||||
|
|
||||||
|
populate_datasets
|
||||||
|
|
||||||
### Command
|
### Command
|
||||||
case "$1" in
|
case "$1" in
|
||||||
list) list_datasets ;;
|
list) list_datasets ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user