add instructions to take a backup with pg_dump (#754)

This commit is contained in:
Chris
2022-06-25 07:39:41 +08:00
committed by GitHub
parent 938c359e5a
commit 7f2bf0c598

View File

@@ -20,6 +20,19 @@ used from the local shell like so:
-c "SQL_STATEMENT"
```
In addition, the `pg_dump` utility is also bundled; this can be used to take
consistent backups of the database. To dump a copy of the database in the
standard SQL query format execute it like this (replace `/path/to/backup.sql`
with the location to create the SQL file):
```shell
/opt/firezone/embedded/bin/pg_dump \
-U firezone \
-d firezone \
-h localhost \
-p 15432 > /path/to/backup.sql
```
This can be useful for debugging or troubleshooting purposes. It can also be
used to modify Firezone configuration data, but **this can have unintended
consequences**. We recommend using the UI (or upcoming API) <!-- XXX: Remove