mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-01-16 23:00:51 +00:00
Update backup and restore commands in Postgres.md
This commit is contained in:
parent
9b70dd2ce6
commit
9cf2ae4326
1 changed files with 11 additions and 3 deletions
|
|
@ -37,6 +37,14 @@ Please make sure you have `pg_dump` and `pg_restore` installed on your local mac
|
|||
To take a backup of the database, use the following command:
|
||||
|
||||
```
|
||||
# Source Database
|
||||
pg_dump -h localhost -p 5432 -U <source_username> -d oneuptimedb -f oneuptime.sql
|
||||
```
|
||||
# Source Database. This will prompt for the password
|
||||
pg_dump --host=<source_port> --port=<target_port> --username=<source_username> --password --dbname=oneuptimedb --file=oneuptime.sql
|
||||
```
|
||||
|
||||
|
||||
To restore the database, use the following command:
|
||||
|
||||
```
|
||||
# Target Database. This will prompt for the password
|
||||
pg_restore --host=localhost --port=5432 --username=<target_username> --dbname=oneuptimedb --password --file=oneuptime.sql
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue