diff --git a/backups/backup_mysql.sh b/backups/backup_mysql.sh index 81b9e97aca876a4214a3f847bd3666f5594adc16..4fe0ad1d5f382fea7ef5828e8907aee2bd6b9abc 100755 --- a/backups/backup_mysql.sh +++ b/backups/backup_mysql.sh @@ -131,6 +131,14 @@ function validate_args () { get_absolute_path "${kwargs[backup_path]}" backup_folder="${return_value}" fi + + # Validate backup folder. + if [[ ! -d ${backup_folder} ]] + then + echo -e "${text_red}Provided backup location is not a folder, or does not exist.${text_reset}" + echo -e "${text_red}Please verify the location exists, and that the location points to a folder, not a file.${text_reset}" + exit 0 + fi }