> I don't really understand this. How to put password in ~/.pgpass. What
> changes do I need to do on the script? How do I access to the password
> to authenticate?
Follow the below steps to automate your backup process.
bash$ echo your_host:5432:your_user:your_db:your_pass > ~/.pgpass
bash$ chmod 600 ~/.pgpass
Now, run your script and it must have been automated.
regards,
bhuvaneswaran