From a6c2352ebc526d8a972b679d8c3996361e782ebf Mon Sep 17 00:00:00 2001 From: Jimmy Maple Date: Sun, 19 Apr 2020 00:28:19 -0400 Subject: [PATCH] fix(command_backup): Correct path for exludedir variable The current implementation doesn't use the full file path to determine the existence of the backup directory in relation to the server which means the current stats just looks for the "lgsm/backup" directory. That may work if you're already in the root directory for the server but if you're scripting the backups via cron, you're not likely going to be invoking the backup from the root directory. --- lgsm/functions/command_backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index 5e84d76d1..99cd1237c 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -132,7 +132,7 @@ fn_backup_compression(){ excludedir=$(fn_backup_relpath) # Check that excludedir is a valid path. - if [ ! -d "${excludedir}" ] ; then + if [ ! -d "${rootdir}/${excludedir}" ] ; then fn_print_fail_nl "Problem identifying the previous backup directory for exclusion." fn_script_log_fatal "Problem identifying the previous backup directory for exclusion" core_exit.sh