obnam validation

This commit is contained in:
Bob Mottram 2017-05-12 10:40:00 +01:00
parent 59c985fde4
commit b479b2b61e
1 changed files with 20 additions and 0 deletions

View File

@ -289,6 +289,16 @@ function backup_directory_to_usb {
}
function restore_directory_from_usb {
if [ ! ${1} ]; then
echo "obnam restore -r $USB_MOUNT/backup/${2} --to ${1}"
echo $'No restore destination given'
return
fi
if [ ! ${2} ]; then
echo "obnam restore -r $USB_MOUNT/backup/${2} --to ${1}"
echo $'No restore source given'
return
fi
if [ ! -d ${1} ]; then
mkdir ${1}
fi
@ -297,6 +307,16 @@ function restore_directory_from_usb {
}
function restore_directory_from_friend {
if [ ! ${1} ]; then
echo "obnam restore -r $SERVER_DIRECTORY/backup/${2} --to ${1}"
echo $'No restore destination given'
return
fi
if [ ! ${2} ]; then
echo "obnam restore -r $SERVER_DIRECTORY/backup/${2} --to ${1}"
echo $'No restore source given'
return
fi
if [ ! -d ${1} ]; then
mkdir ${1}
fi