diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index 61949dce..e0fd65fd 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -562,6 +562,9 @@ function restore_database { if [ -d $USB_MOUNT/backup/${restore_app_name} ]; then echo $"Restoring ${restore_app_name} database" local_database_dir=/root/temp${restore_app_name}data + if [ -d ${local_database_dir} ]; then + rm -rf ${local_database_dir} + fi function_check restore_directory_from_usb restore_directory_from_usb "${local_database_dir}" "${restore_app_name}data" if [ ! -f /root/temp${restore_app_name}data/${RESTORE_SUBDIR}/temp${restore_app_name}data/${restore_app_name}.sql ]; then