PostgreSQL : Useful command line tips

How to access my postgree ?

$psql -h server -U userName

 How to list my existing databases ?


 How to connect in some database ?

$\c databaseName

How to make a backup ?

$pg_dump databaseName -h localhost -U postgres > backup.sql

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s