Make sure we enter the binary directory before running backup

This commit is contained in:
deajan 2024-06-10 22:05:16 +02:00
parent 2098b298b6
commit 71151e93cd

View file

@ -128,6 +128,7 @@ function run_backup {
sed -i "s%### SOURCE ###%${BACKUP_FILE_LIST}%g" "${NPBACKUP_CONF_FILE}"
sed -i "s%### VM ###%${vm}%g" "${NPBACKUP_CONF_FILE}"
cd "$(dirname "$NPBACKUP_EXECUTABLE")"
"$NPBACKUP_EXECUTABLE" --config-file "${NPBACKUP_CONF_FILE}" --backup --force >> "$LOG_FILE" 2>&1
if [ $? -ne 0 ]; then
log "Backup failure"