obnam validation
This commit is contained in:
parent
59c985fde4
commit
b479b2b61e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue