pg_dump: command not found

Hi to All,

could Anyone resolve this problem?

It was made a file named backup.sh which contains :

pg_dump -h localhost -U user -c -R -v nome_database -n nome_schema > /percorso/dove/salvare/il/file.sql

If the file is executed by the operator it goes ok. It does not require password therefore the pgpass file was configured.

But if the file is executed trough crontab it does not go.
The error message is the subiect:

pg_dump: command not found
```.

Tanks in advance.
Gianni Pinna.

Are you working with the bundled versión of postgres ?

Hi Gianni,

You should use the full path to the pg_dump executable. I don’t think cron jobs will have any environment variables set from the user.

Hope this helps.

Hi Robert,
it is right.
Tank You very much for Your always precious help.
Good year, Robert.
The time is what the men have more than the angels to deserve.
Gianni Pinna