1
0
mirror of https://github.com/deajan/obackup.git synced 2024-09-28 16:13:40 +02:00

Check backup type before remote system URI

This commit is contained in:
deajan 2017-02-11 11:17:44 +01:00
parent 34ba82784b
commit 52161b3faf

View File

@ -7,7 +7,7 @@ PROGRAM="obackup"
AUTHOR="(C) 2013-2017 by Orsiris de Jong"
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
PROGRAM_VERSION=2.1-beta1+dev
PROGRAM_BUILD=2017021001
PROGRAM_BUILD=2017021101
IS_STABLE=no
#### Execution order #__WITH_PARANOIA_DEBUG
@ -1752,6 +1752,7 @@ function Init {
trap TrapStop INT QUIT TERM HUP
trap TrapQuit EXIT
if [ "$BACKUP_TYPE_" == "pull" ] || [ "$BACKUP_TYPE" == "push" ]; then
## Test if target dir is a ssh uri, and if yes, break it down it its values
if [ "${REMOTE_SYSTEM_URI:0:6}" == "ssh://" ] && [ "$BACKUP_TYPE" != "local" ]; then
REMOTE_OPERATION="yes"
@ -1783,6 +1784,7 @@ function Init {
fi
REMOTE_HOST=${hosturi%%:*}
fi
fi
## Add update to default RSYNC_ARGS
RSYNC_ARGS=$RSYNC_ARGS" -u"