Connect to progresql

psql databaseName username

lists all databases

\list

lists all tables in the current database

\dt

Creating a backup login role

CREATE ROLE backupuser WITH LOGIN PASSWORD 'somePassword' VALID UNTIL 'infinity';
GRANT SELECT ON ALL TABLES IN SCHEMA public TO backupuser;
GRANT CONNECT ON DATABASE somedb to backupuser;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO backupuser;