Creating a copy of a database in PostgreSQL.
This commit is contained in:
parent
6702e1e4f0
commit
18d6f6951e
@ -54,3 +54,9 @@
|
||||
|
||||
If you're using CLI and you're a postgres user, then you can do this:
|
||||
`psql -c "SELECT version();"`
|
||||
|
||||
### Creating a copy of a database in PostgreSQL.
|
||||
```
|
||||
pg_dumpall > db.out # backup
|
||||
psql -f db.out postgres # restore (might requires some DROP DATABASE xxx if you do want to replace existing data with same db and table names.
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user