Skip to main content
type: postgresql uses pg_dump to produce a logical dump of one database.

Example

snapr.yaml

Options

Requirements

  • pg_dump must be installed on the snapr host and available in PATH. Install it from the official PostgreSQL apt repository or your distro’s postgresql-client-<version> package.
  • The configured user needs at least CONNECT on the database and SELECT on every table being dumped — typically a dedicated read-only role.
The major version of pg_dump should match the PostgreSQL server version. A newer client can dump older servers, but an older client against a newer server will fail.

Notes

  • extraParams keys are prefixed with --. Use an empty string value for boolean flags.
  • The password is forwarded through PGPASSWORD, so it never appears in the process listing.