Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 5955F2E005B for ; Thu, 17 Apr 2008 19:59:48 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 81542-08 for ; Thu, 17 Apr 2008 19:59:39 -0300 (ADT) X-Greylist: delayed 00:13:36.675495 by SQLgrey-1.7.5 Received: from server.firetrust.net (mailserver.firetrust.com [209.213.221.13]) by developer.postgresql.org (Postfix) with ESMTP id 6D7162E002D for ; Thu, 17 Apr 2008 19:59:45 -0300 (ADT) Received: from localhost.localdomain (root@[192.168.1.247]) (authenticated bits=0) by server.firetrust.net (8.14.2/8.14.2) with ESMTP id m3HMk2i7012977 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 18 Apr 2008 10:46:05 +1200 Date: Fri, 18 Apr 2008 10:46:00 +1200 From: Steve Holdoway To: pgsql-admin@postgresql.org Subject: Re: Database update problem from crontab on ubuntu server Message-Id: <20080418104600.dbb62b3c.steve.holdoway@firetrust.com> In-Reply-To: <4807B143.5080006@mysoft.ge> References: <4807B143.5080006@mysoft.ge> Organization: Firetrust Ltd X-Mailer: Sylpheed 2.5.0beta1 (GTK+ 2.12.9; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Fri__18_Apr_2008_10_46_00_+1200_9G6g6pzpOxiQdlhj" X-MailWasher-Server-Scanned: Checked by MailWasher server v2.3.0 (www.Firetrust.com) X-MailWasher-Server-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/182 X-Sequence-Number: 28946 --Signature=_Fri__18_Apr_2008_10_46_00_+1200_9G6g6pzpOxiQdlhj Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, 18 Apr 2008 00:21:23 +0400 David Jorjoliani wrote: > Hi, >=20 > 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 erro= r: >=20 > "unexpected EOF on client connection" >=20 > while update running from cron. If I run this update manually from root > user - it works fine. Here is update command: >=20 > su -l postgres -c "gunzip -c /backup/rms.gz | psql rms" >=20 > Can somebody give any suggestion? >=20 > Thanks, > David >=20 >=20 > --=20 > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.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 th= at it can't find gunzip. Try either setting the PATH in the script, or usin= g the full pathname of gunzip instead... Cheers, Steve --Signature=_Fri__18_Apr_2008_10_46_00_+1200_9G6g6pzpOxiQdlhj Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIB9MoDN07rEXM5z0RAsLzAJ9bXPHoYd04Ty/sb9bwVt97QVAu6gCgusBN IZsXG/QBkUGbcr7vf1Xeqbs= =aNbu -----END PGP SIGNATURE----- --Signature=_Fri__18_Apr_2008_10_46_00_+1200_9G6g6pzpOxiQdlhj--