minor fixes
This commit is contained in:
parent
e883f7b01e
commit
7fb56fab68
18
btrbk
18
btrbk
|
@ -10,7 +10,7 @@ function bkRun {
|
|||
for i in ${!SUBVOLS[@]}; do
|
||||
snapName=${VOLNAME[$i]}.$date
|
||||
getSnap "$i"
|
||||
if [[ -d "$SNAPDIR$snapName" && $force = 0 ]] ; then
|
||||
if [[ -d "$SNAPDIR$snapName" ]] && ! $force; then
|
||||
echo "backup already run today"
|
||||
continue
|
||||
else
|
||||
|
@ -115,9 +115,9 @@ function testConf {
|
|||
fi
|
||||
if rclone ls $RCLONEDIR > /dev/null 2>&1; then
|
||||
if gpg --list-key $PUBKEY > /dev/null 2>&1; then
|
||||
if [ $restore=1 ]; then
|
||||
if $restore; then
|
||||
runRestore
|
||||
elif [ $backup=1 ]; then
|
||||
elif $backup; then
|
||||
testDate
|
||||
fi
|
||||
else
|
||||
|
@ -161,19 +161,19 @@ eval set -- "$options"
|
|||
|
||||
while true; do
|
||||
case $1 in
|
||||
-b|--backup) backup=1; shift;;
|
||||
-f|--force) force=1; shift;;
|
||||
-b|--backup) backup=true; shift;;
|
||||
-f|--force) force=true; shift;;
|
||||
-d|--date) rDate="$2"; shift;;
|
||||
-r|--restore) restore=1; restoreVol=$2; shift;;
|
||||
-x|--full-restore) fullRestore=1; restoreDir=$2; shift;;
|
||||
-r|--restore) restore=true; restoreVol=$2; shift;;
|
||||
-x|--full-restore) fullRestore=true; restoreDir=$2; shift;;
|
||||
-h|--help) Help; shift; break;;
|
||||
--) shift; break;;
|
||||
\?) echo "error"; exit 1;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
if [ $fullRestore = "1" ]; then
|
||||
if $fullRestore; then
|
||||
runFullRestore
|
||||
else
|
||||
elif $backup
|
||||
testConf
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue