2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-19 03:25:44 +00:00

Merge pull request #66 from abitrolly/patch-1

Cheat sheet for PostgreSQL
This commit is contained in:
Igor Chubin 2019-09-15 20:23:55 +02:00 committed by GitHub
commit e7b4520639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

10
sheets/postgresql Normal file
View File

@ -0,0 +1,10 @@
# PostgreSQL database administration
# check connection to a database on host `localhost` and port `5432`
pg_isready -h localhost -p 5432
# backup database named `anitya`, add CREATE statement
sudo -u postgres pg_dump -C anitya > anitya.dump
# restore database
sudo -u postgres pqsql -f anitya.dump