Documentation
¶
Overview ¶
Package dbbackup creates a plain-SQL pg_dump of the OpenWatch database, used as the pre-upgrade restore point before migrations run.
The cardinal rule: connection parameters (especially the password) go to pg_dump via PG* environment variables, NEVER on the command line — so the password never appears in the process argv (visible in `ps`). This mirrors how the rest of the codebase keeps credentials out of argv.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Command ¶
Command builds the pg_dump command writing a plain-SQL dump to outPath. Connection parameters live in cmd.Env (PG*), NONE in cmd.Args — the tests pin that the password never reaches argv.
func DumpFileName ¶
DumpFileName returns the backup filename for a dump taken at stamp (an already-formatted timestamp, e.g. "20260616T010203Z") for version. Pure, so the caller owns the clock and tests are deterministic.
Types ¶
This section is empty.