Compare commits
2 Commits
50834327da
...
afee68fa90
| Author | SHA1 | Date | |
|---|---|---|---|
| afee68fa90 | |||
| 32f943ac34 |
@@ -11,11 +11,11 @@ If a different version of Postgres is needed, just change the version number in
|
||||
## Dumping a Database
|
||||
|
||||
```bash
|
||||
docker run --network host --rm -v .:/tmp -e PGPASSWORD=mysecretpassword postgres:16 pg_dump -h localhost -U myuser -d mydb > /tmp/dump.sql
|
||||
docker run --network host --rm -v .:/tmp -e PGPASSWORD=mysecretpassword postgres:16 pg_dump -h localhost -U myuser -d mydb -f /tmp/dump.sql
|
||||
```
|
||||
|
||||
## Restoring a Database
|
||||
|
||||
```bash
|
||||
docker run --network host --rm -v .:/tmp -e PGPASSWORD=mysecretpassword postgres:16 psql -h localhost -U myuser -d mydb < /tmp/dump.sql
|
||||
docker run --network host --rm -v .:/tmp -e PGPASSWORD=mysecretpassword postgres:16 psql -h localhost -U myuser -d mydb -f /tmp/dump.sql
|
||||
```
|
||||
Reference in New Issue
Block a user