Multiple bugs in PostgreSQL hook #678
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
Use the PostgreSQL hook to backup my databases with borgmatic, so I don't have to dump them manually.
Steps to reproduce / actual behavior
Separate bugs, each with the repro and the observed behavior:
psql_command
andpg_restore_command
options.These commands are executed without
shell=True
, so the subprocessmodule treats e.g.
docker exec my_pg_container psql
as a single command(resulting in
Errno 2 "No such file or directory"
) instead of a commandwith arguments.
psql
shouldn't read~/.psqlrc
.Some settings in user's
~/.psqlrc
, e.g.linestyle unicode
, may break theCSV output.
--no-psqlrc
tellspsql
to not read this startup file.This is not necessary for the analyze_command and restore_command (with
all_databases), but it's generally recommended when running psql from a
script.
psql_command
option for listing databse when dumpingall
.Environment
Unknown. This ticket was created from commit messages in this PR: #677
Fixed in main by @jirutka. Will be part of the next release.
This was just released in borgmatic 1.7.13!