mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-09 22:46:59 +08:00
Make sure we enter the binary directory before running backup
This commit is contained in:
parent
2098b298b6
commit
71151e93cd
1 changed files with 1 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue