@@ -2416,6 +2416,11 @@ function get_mariadb_owncloud_admin_password {
}
function backup_directory_to_usb {
+ if [ ! -d ${1} ]; then
+ echo "WARNING: directory does not exist: ${1}"
+ return
+ fi
+
if [[ $BACKUP_TYPE == 'obnam' ]]; then
BACKUP_KEY_EXISTS=$(gpg --list-keys "$MY_NAME (backup key)")
if [ ! "$?" = "0" ]; then