Postgresql

Postgresql Installation and Backup Service

To backup read here. or use as user postgres:

 backup:
 pg_dumpall | gzip -c > all.dbs.out.gz

and to restore:

 gunzip all.dbs.out.gz
 psql -f all.dbs.out postgres

get list of databases and tables in Postgres

 select datname from pg_database;

or:

 \l
list of databases
 \dt
list of tables in current database