Skip site navigation (1) Skip section navigation (2)

Re: Database update problem from crontab on ubuntu server

From: Steve Holdoway <steve(dot)holdoway(at)firetrust(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Database update problem from crontab on ubuntu server
Date: 2008-04-17 22:46:00
Message-ID: 20080418104600.dbb62b3c.steve.holdoway@firetrust.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Fri, 18 Apr 2008 00:21:23 +0400
David Jorjoliani <djorj(at)mysoft(dot)ge> wrote:

> Hi,
> 
> I have daily cron jobs for database update, which where working fine on
> Fedore Core 6. No I move it on Ubuntu Server 7.10 and postgres gives error:
> 
> "unexpected EOF on client connection"
> 
> while update running from cron. If I run this update manually from root
> user - it works fine. Here is update command:
> 
> su -l postgres -c "gunzip -c /backup/rms.gz | psql rms"
> 
> Can somebody give any suggestion?
> 
> Thanks,
> David
> 
> 
> -- 
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin

In crontab you have almost no $PATH set up by default. My expectation is that it can't find gunzip. Try either setting the PATH in the script, or using the full pathname of gunzip instead...

Cheers,

Steve

In response to

pgsql-admin by date

Next:From: Michael MonnerieDate: 2008-04-17 23:20:24
Subject: Re: duplicate primary index in bayes db from SpamAssassin
Previous:From: Kevin GrittnerDate: 2008-04-17 22:09:34
Subject: Re: Database update problem from crontab on ubuntuserver

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group