From: | "Kogotkov, Vyacheslav" <Vyacheslav(dot)Kogotkov(at)artificial-life(dot)com> |
---|---|
To: | "Pgsql-Admin(at)Postgresql(dot) Org (E-mail)" <pgsql-admin(at)postgresql(dot)org> |
Subject: | can't run pg_dump in sh script using crontab |
Date: | 2001-02-10 11:35:12 |
Message-ID: | D15F32DE6D70D411814400508B4492ED55EC61@SVRSPBEXCH01 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Dear colleagues,
Besides I am new to Postgres, I am new to linux too.
I have a sh-script which run pg_dump by hand successfully. But
I have no results when I run this script using crontab. I haven't got
any error log.
Please, help me.
Here is my sh-script:
#!/bin/sh
PG_BIN=/ora/pgsql/bin
BACKUP_DEST=/ora/home/FOR_POSTGRES/backup/dump
$PG_BIN/pg_dump -f $BACKUP_DEST/`date +%d%m%Y`_cspb.dmp dbname
PG_VERSION contains 7.0.
File HISTORY contains "Release 7.0.3".
I have a single version of Postgres, so pg_dump
is the same version.
I connect to linux as user "oracle". He has an access to
database "dbname" and can SELECT data using psql. As far as
I remember, I create this database as user "oracle".
I usually start postmaster as user "oracle".
And I edit crontab as "oracle".
As "oracle", I can run this shell script by hand and get a good
dump file.
But I get nothing if I run it using cron.
I think, may be oracle pg_dump can't find database
"dbname" when it runs by crontab ?
Thanks,
Slava
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Huber | 2001-02-10 14:31:24 | Re: can't run pg_dump in sh script using crontab |
Previous Message | Stefan Huber | 2001-02-09 10:34:08 | Re: Re: pgadmin |