mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-22 07:15:06 +00:00
ADded debug mode.
This commit is contained in:
parent
0150b3f9f1
commit
bea5527b30
@ -171,6 +171,10 @@ send_latest()
|
|||||||
for dataset in $SEND_DATASETS; do
|
for dataset in $SEND_DATASETS; do
|
||||||
dataset=`echo $dataset|cut -d':' -f1`
|
dataset=`echo $dataset|cut -d':' -f1`
|
||||||
remote_dataset=`echo $dataset|cut -d':' -f2`
|
remote_dataset=`echo $dataset|cut -d':' -f2`
|
||||||
|
if [ $BG_DEBUG_MODE = "TRUE" ]; then
|
||||||
|
echo dataset: $dataset
|
||||||
|
echo remote dataset: $remote_dataset
|
||||||
|
fi
|
||||||
origin_snapshot=`get_latest_snapshot $dataset`
|
origin_snapshot=`get_latest_snapshot $dataset`
|
||||||
if [ $BG_TEST_MODE = "TRUE" ]; then
|
if [ $BG_TEST_MODE = "TRUE" ]; then
|
||||||
echo zfs send $ZFS_SEND_OPTS $dataset@$origin_snapshot \| \
|
echo zfs send $ZFS_SEND_OPTS $dataset@$origin_snapshot \| \
|
||||||
@ -237,6 +241,10 @@ while :; do
|
|||||||
BG_TEST_MODE=TRUE
|
BG_TEST_MODE=TRUE
|
||||||
echo Test mode.
|
echo Test mode.
|
||||||
;;
|
;;
|
||||||
|
-d)
|
||||||
|
BG_DEBUG_MODE=TRUE
|
||||||
|
echo Debug mode.
|
||||||
|
;;
|
||||||
--) shift; break ;;
|
--) shift; break ;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
|
Loading…
Reference in New Issue
Block a user