Postgresql command line
Backup:
$ pg_dump -U {user-name} {source_db} -f {dumpfilename.sql}
Restore:
$ psql -U {user-name} -d {desintation_db}-f {dumpfilename.sql}
Connect: $ psql -U {user-name} {source_db}
List databases:
\l
List tables:
\dt \dt+
Desc table:
\d+ tablename