You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
302 B
Plaintext
11 lines
302 B
Plaintext
# 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
|