Skip to content
Snippets Groups Projects
Commit b479b2b6 authored by Bob Mottram's avatar Bob Mottram
Browse files

obnam validation

parent 59c985fd
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment