- Make new pgpass file in the root folder
$ vi .pgpass
And paste the content from /root/.pgpass
- Create new file
/root/pg_backup.sh
and paste the content - Change permissions
$ chmod 700 /root/pg_backup.sh
- Add new cron
$ crontab -e
0 0 * * * /root/pg_backup.sh