I want to automate backup of PostgreSQL database using crontab in UNIX. I have tried but it will create 0 bytes backup.
My crontab entry is:
24 * * * * /home/desktop/myscript.sh
and my sh file contains the following code:
pg_dump -U PostgreSQL -d test > b.backup
It will create the file but the file is empty. Is there any solution? Is there any way to solve this question?