pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
RE: ???solution??? --> can't run pg_dump in sh script usi ng crontab
3+ messages / 2 participants
[nested] [flat]

* RE: ???solution??? --> can't run pg_dump in sh script usi ng crontab
@ 2001-02-10 14:58  Kogotkov, Vyacheslav <Vyacheslav.Kogotkov@artificial-life.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Kogotkov, Vyacheslav @ 2001-02-10 14:58 UTC (permalink / raw)
  To: 'Stefan Huber' <schweinsaug@crosswinds.net>; pgsql-admin

   Thank you for your help.

   I managed to get an output by mail:

"/opt/postgresql/bin/pg_dump: error in loading shared libraries:
libpq.so.2.1: cannot open shared object file: No such file or directory"
 
   I've just found a solution from old postgresql archive:
"You can just put the postgresql lib directory in /etc/ld.so.conf and run 
ldconfig."
   It seems to be working. I've just got a dump file. 
   But I have a question: is this solution enough for successful pg_dump
or I have to do something else to exclude failure ?

   Thanks
   Slava     

-----Original Message-----
From: Stefan Huber [mailto:schweinsaug@crosswinds.net]
Sent: Saturday, February 10, 2001 5:31 PM
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] can't run pg_dump in sh script using crontab



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


Ist your crontab a systemwide one? (ie: /etc/crontab ?) this one's normally 
run as root, but you may specify a special user. does your script run as 
root, too? So you might ewant to un your script as
* * * * * su - oracle -c '/path/to/script/yourscript'

Stefan



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* RE: ???solution??? --> can't run pg_dump in sh script usi ng crontab
@ 2001-02-10 15:24  Kogotkov, Vyacheslav <Vyacheslav.Kogotkov@artificial-life.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Kogotkov, Vyacheslav @ 2001-02-10 15:24 UTC (permalink / raw)
  To: 'Stefan Huber' <schweinsaug@crosswinds.net>; pgsql-admin

  Thanks a lot for your help !

  Regards,
  Slava  

-----Original Message-----
From: Stefan Huber [mailto:schweinsaug@crosswinds.net]
Sent: Saturday, February 10, 2001 6:30 PM
To: pgsql-admin@postgresql.org
Subject: RE: [ADMIN] ???solution??? --> can't run pg_dump in sh script
usi ng crontab



>"/opt/postgresql/bin/pg_dump: error in loading shared libraries:
>libpq.so.2.1: cannot open shared object file: No such file or directory"


ah, that explains much.

>"You can just put the postgresql lib directory in /etc/ld.so.conf and run
>ldconfig."

Yes, that's it

>    But I have a question: is this solution enough for successful pg_dump
>or I have to do something else to exclude failure ?

Maybe, as I stated before, you might needt to allow root to access the 
databases or to run your pg_dump-script as
   su - oracle -c 'pg_dump <dbname>'

If your database user (oracle) has PG_LIB (I don't remember the variable 
exactly, but it's something like that, take a look at the INSTALL file in 
the postgresql-source tree) set, then you don't even need ldconfig.

Stefan



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* RE: ???solution??? --> can't run pg_dump in sh script usi ng crontab
@ 2001-02-10 15:29  Stefan Huber <schweinsaug@crosswinds.net>
  parent: Kogotkov, Vyacheslav <Vyacheslav.Kogotkov@artificial-life.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Stefan Huber @ 2001-02-10 15:29 UTC (permalink / raw)
  To: pgsql-admin


>"/opt/postgresql/bin/pg_dump: error in loading shared libraries:
>libpq.so.2.1: cannot open shared object file: No such file or directory"


ah, that explains much.

>"You can just put the postgresql lib directory in /etc/ld.so.conf and run
>ldconfig."

Yes, that's it

>    But I have a question: is this solution enough for successful pg_dump
>or I have to do something else to exclude failure ?

Maybe, as I stated before, you might needt to allow root to access the 
databases or to run your pg_dump-script as
   su - oracle -c 'pg_dump <dbname>'

If your database user (oracle) has PG_LIB (I don't remember the variable 
exactly, but it's something like that, take a look at the INSTALL file in 
the postgresql-source tree) set, then you don't even need ldconfig.

Stefan




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-02-10 15:29 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-10 14:58 RE: ???solution??? --> can't run pg_dump in sh script usi ng crontab Kogotkov, Vyacheslav <Vyacheslav.Kogotkov@artificial-life.com>
2001-02-10 15:29 ` Stefan Huber <schweinsaug@crosswinds.net>
2001-02-10 15:24 RE: ???solution??? --> can't run pg_dump in sh script usi ng crontab Kogotkov, Vyacheslav <Vyacheslav.Kogotkov@artificial-life.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox