Re: [ADMIN] Database update problem from crontab on ubuntu server

2008-04-20 Thread David Jorjoliani
It fixed! When I make shell script and send to some file like: /usr/local/backupscripts/bk.sh > /var/log/rmsupdate.log and inside bk.sh I have the same command as it was in cron: su -l postgres -c "/bin/gunzip -c /backup/rms.gz | /usr/lib/postgresql/8.2/bin/psql rms" Only putting command in she

Re: [ADMIN] Database update problem from crontab on ubuntu server

2008-04-20 Thread Medi Montaseri
The usual trap in cron usage is the fact that crontab commands are executed in a cleanroom environment, ie no environment variable is used/inherited, so PATH, HOME, PGDATA, etc are not set/available when the command is launched. You can set vars or be very explicit in your script including DB name

Re: [ADMIN] Database update problem from crontab on ubuntu server

2008-04-20 Thread Phillip Smith
> same result when it running trough cronjob. Manually everything is > fine. Even I put this commands (without su -l ...) in postgres user > crontab, but same result. > > Server is ubuntu 64bit. Does it makes any difference from 32bit in > terms of crontab functionality? System architecture shoul

Re: [ADMIN] Database update problem from crontab on ubuntu server

2008-04-17 Thread David Jorjoliani
I tried with full paths: su -l postgres -c "/bin/gunzip -c /backup/rms.gz | /usr/lib/postgresql/8.2/bin/psql rms" su -l postgres -c "/bin/gunzip -c /backup/rms.gz | /usr/bin/psql rms" su -l postgres -c "/bin/zcat /backup/rms.gz | /usr/lib/postgresql/8.2/bin/psql rms" su -l postgres -c "/bin/zcat

Re: [ADMIN] Database update problem from crontab on ubuntu server

2008-04-17 Thread Phillip Smith
> su -l postgres -c "gunzip -c /backup/rms.gz | psql rms" You could also try: /bin/zcat /backup/rms.gz | /usr/local/postgres/bin/psql rms THINK BEFORE YOU PRINT - Save paper if you don't really need to print this ***Confidentiality and Privilege Notice*** The ma

Re: [ADMIN] Database update problem from crontab on ubuntu server

2008-04-17 Thread Steve Holdoway
On Fri, 18 Apr 2008 00:21:23 +0400 David Jorjoliani <[EMAIL PROTECTED]> 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 upda

Re: [ADMIN] Database update problem from crontab on ubuntu server

2008-04-17 Thread Kevin Grittner
>>> On Thu, Apr 17, 2008 at 3:21 PM, in message <[EMAIL PROTECTED]>, David Jorjoliani <[EMAIL PROTECTED]> wrote: > 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

[ADMIN] Database update problem from crontab on ubuntu server

2008-04-17 Thread David Jorjoliani
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 upda