Thread: RE: ???solution??? --> can't run pg_dump in sh script usi ng crontab
RE: ???solution??? --> can't run pg_dump in sh script usi ng crontab
From
"Kogotkov, Vyacheslav"
Date:
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
>"/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
Hi ! I did a pgdump on a database. It was ok After, all tables have dissapeard ,even those in other databases ! when I check in the data directories, all datas are here, but in pg_class, there is no more tables ! (except system tables !) Is there a way to retrieve my lost tables ????? jean-arthur ---------------------------------------------------------------- Le simple fait de passer par la fenetre ne suffit pas a la transformer en porte.
It s strange : I can do a "SELECT.." on my tables : return 0 rows (but there is 1000 rows !!!) but when i do "\d", it says "couldn't find any tables"... any idea ??? At 10:11 12/02/01 +0100, Jean-Arthur Silve wrote: >Hi ! > >I did a pgdump on a database. It was ok > >After, all tables have dissapeard ,even those in other databases ! > >when I check in the data directories, all datas are here, but in pg_class, >there is no more tables ! (except system tables !) > >Is there a way to retrieve my lost tables ????? > >jean-arthur >---------------------------------------------------------------- >Le simple fait de passer par la fenetre ne suffit pas a la transformer en >porte. ---------------------------------------------------------------- Le simple fait de passer par la fenetre ne suffit pas a la transformer en porte.