meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| linux:databases:psql [2016/12/19 09:55] – created niziak | linux:databases:psql [2021/10/11 10:47] (current) – niziak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== postgresql ====== | ||
| + | |||
| <code bash> | <code bash> | ||
| su - postgres | su - postgres | ||
| Line 20: | Line 22: | ||
| GRANT postgres TO joe; | GRANT postgres TO joe; | ||
| </ | </ | ||
| + | |||
| + | <code bash> | ||
| + | # list tables | ||
| + | sudo -u postgres psql -p 5430 -l | ||
| + | |||
| + | # dump table | ||
| + | sudo -u postgres pg_dump -p 5430 -c jiradb | xz > jiradb.sql.xz | ||
| + | |||
| + | sudo -u postgres psql -p 5430 -c 'drop database jiradb' | ||
| + | </ | ||
| + | |||
| + | |||