dump/postgresql: Fix dump_cmd usage
All checks were successful
gitea/evobackup/pipeline/head This commit looks good
All checks were successful
gitea/evobackup/pipeline/head This commit looks good
`var="(<cmd>)"; ${var}` doesn't work in shell. Use "eval" to make it work.
This commit is contained in:
parent
ba087a2a35
commit
886e47ebf7
1 changed files with 2 additions and 2 deletions
|
@ -124,7 +124,7 @@ dump_postgresql_global() {
|
|||
|
||||
dump_cmd="(sudo -u postgres pg_dumpall ${dump_options[*]}) 2> ${error_file} | ${compress_cmd} > ${dump_file}"
|
||||
log "LOCAL_TASKS - ${FUNCNAME[0]}: ${dump_cmd}"
|
||||
${dump_cmd}
|
||||
eval "${dump_cmd}"
|
||||
|
||||
local last_rc=$?
|
||||
# shellcheck disable=SC2086
|
||||
|
@ -275,7 +275,7 @@ dump_postgresql_per_base() {
|
|||
|
||||
dump_cmd="(sudo -u postgres /usr/bin/pg_dump ${dump_options[*]}) 2> ${error_file} | ${compress_cmd} > ${dump_file}"
|
||||
log "LOCAL_TASKS - ${FUNCNAME[0]}: ${dump_cmd}"
|
||||
${dump_cmd}
|
||||
eval "${dump_cmd}"
|
||||
|
||||
local last_rc=$?
|
||||
# shellcheck disable=SC2086
|
||||
|
|
Loading…
Add table
Reference in a new issue