I am using Postgres for a django project and I am currently implementing a database backup/restore system that as simple as possible performs a pg_dump when the user clicks
Deepak@deepak:~$ sudo -i -u postgres
postgres@deepak:~$ psql
psql (9.3.5)
Type "help" for help.
postgres=# GRANT ALL PRIVILEGES ON DATABASE database_name TO user;
postgres=# GRANT