aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/subcommands/backup.bash8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/subcommands/backup.bash b/lib/subcommands/backup.bash
index d717779..c6e5821 100644
--- a/lib/subcommands/backup.bash
+++ b/lib/subcommands/backup.bash
@@ -158,13 +158,11 @@ backup_database_postgresql() {
cmd_create=(
"borg" "create"
"--remote-path" "$remote"
- "--content-from-command"
"$repo/postgresql-$database::$database-$(datetime)"
- "--"
- "pg_dump" "$database"
+ "-"
)
- notice "$BASHTARD_NAME/backup/$index" "> ${cmd_create[*]}"
- ${cmd_create[@]}
+ notice "$BASHTARD_NAME/backup/$index" "> pg_dump "$database" | ${cmd_create[*]}"
+ pg_dump "$database" | ${cmd_create[@]}
done < <(psql -AXt -d template1 -c "SELECT datname FROM pg_database")
}