Mic92 created page: home
This commit is contained in:
parent
e9aaf49c25
commit
4d010a9974
@ -15,8 +15,8 @@ $ sudo psql -h postgres -U postgres
|
|||||||
psql> \l # list databases
|
psql> \l # list databases
|
||||||
psql> \c <database> # connect to database
|
psql> \c <database> # connect to database
|
||||||
psql> \d # show tables
|
psql> \d # show tables
|
||||||
$ sudo pg_dump -h postgres -U postgres <dbname> > dump.sql
|
$ sudo pg_dump -h postgres -U postgres <dbname> > dump.sql # backup
|
||||||
$ sudo psql -h postgres -U postgres < dump.sql
|
$ sudo psql -h postgres -U postgres < dump.sql # restore
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user