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
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
> 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
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
> 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
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
>>> 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
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