Automate DB Backups for your Postgres DB. This can be implemented by storing the DB Account password in a .pgpass file under the user’s home directory. The contents of the file look like:
Once the pgpass file is setup – backups is just as simple as
pg_dump -h localhost -U otheruser -w other_db > other_db_backup.sql
-w indicates that the password prompt is not required. The system will look for the password in the user’s pgpass file.