pg_dump: command not found

Questions and answers regarding general SQL and backend databases

pg_dump: command not found

Postby cuoredisardegna » Sat Dec 29, 2012 10:54 am

Hi to All,

could Anyone resolve this problem?


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

Code: Select all
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:
Code: Select all
pg_dump: command not found
.

Tanks in advance.
Gianni Pinna.
cuoredisardegna
 
Posts: 68
Joined: Mon May 07, 2012 5:34 am

Re: pg_dump: command not found

Postby Roberto Blasco » Sat Dec 29, 2012 5:45 pm

Are you working with the bundled versión of postgres ?
User avatar
Roberto Blasco
007
 
Posts: 355
Joined: Tue Apr 08, 2008 7:18 pm
Location: Madrid / Spain

Re: pg_dump: command not found

Postby ROCLASI » Sun Dec 30, 2012 6:01 pm

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.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: pg_dump: command not found

Postby cuoredisardegna » Mon Dec 31, 2012 2:59 pm

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
cuoredisardegna
 
Posts: 68
Joined: Mon May 07, 2012 5:34 am


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 7 guests