|
@@ -326,17 +326,17 @@ dblist () {
|
|
|
|
|
|
# {{{ dbdump()
|
|
# {{{ dbdump()
|
|
dbdump () {
|
|
dbdump () {
|
|
- local db cmd_prog cmd_args pg_args
|
|
|
|
|
|
+ local db_name cmd_prog cmd_args pg_args
|
|
|
|
|
|
- db="${1}"
|
|
|
|
|
|
+ db_name="${1}"
|
|
pg_args="${PG_OPTIONS[*]}"
|
|
pg_args="${PG_OPTIONS[*]}"
|
|
|
|
|
|
- if [ "${db}" = "${GLOBALS_OBJECTS}" ]; then
|
|
|
|
|
|
+ if [ "${db_name}" = "${GLOBALS_OBJECTS}" ]; then
|
|
cmd_prog="pg_dumpall"
|
|
cmd_prog="pg_dumpall"
|
|
cmd_args=(--globals-only)
|
|
cmd_args=(--globals-only)
|
|
else
|
|
else
|
|
cmd_prog="pg_dump"
|
|
cmd_prog="pg_dump"
|
|
- cmd_args=("${DB}")
|
|
|
|
|
|
+ cmd_args=("${db_name}")
|
|
if [ "${CREATE_DATABASE}" = "yes" ]; then
|
|
if [ "${CREATE_DATABASE}" = "yes" ]; then
|
|
pg_args+=(--create)
|
|
pg_args+=(--create)
|
|
fi
|
|
fi
|