Database Dump
To dump a radar database from a remote server (live in this example) to a local file you can use the following command from a local terminal
Code Block | ||||
---|---|---|---|---|
| ||||
pg_dump -U postgresradar -h 10.38.181.78 -Fc -d radar" > /path/to/file/radar.dump |
...
Info |
---|
Details of the available flags and corresponding options can be found in the pg_dump documentation |
Database Restore
To restore the database to a remote server (stagging in this example) from a local file you can use the following command from a local terminal
Code Block | ||||
---|---|---|---|---|
| ||||
pg_restore -U postgresradar -h 10.38.181.94 -d radar /path/to/file/radar.dump |
It's worth noting that most of the flags can still be applied to this command but on the whole are not necessary. pg_restore will automatically detect most of the settings from the dump file.
...