>>>>> pg_dump in crontab

>>>>> pg_dump in crontab

Post by Iwan Tutuka Pambu » Thu, 18 Jan 2001 12:49:51



Hi,

I need to back up my database "test" at 23:30
everyday.

$ crontab -l
30 23 * * * pg_dump test > test.out

I got an error massage
/bin/sh: pg_dump: command not found

$ which pg_dump
/usr/local/pgsql/bin/pg_dump

30 23 * * * /usr/local/pgsql/bin/pg_dump test >
/home/iwan/test.out

I got another error message
/usr/local/pgsql/bin/pgdump: error in loading shared
libraries: libpq.so.2.0: cannot open shared object
file: No such file or directory

But in my machine libpq.so.2.0 located in
/usr/local/src/postgresql-6.5.2/src/interface/libpq/libpq.so.2.0
/usr/local/pgsql/lib/libpq.so.2.0

What's wrong? Please help me ...

Thanks in advance
Iwan

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/

 
 
 

>>>>> pg_dump in crontab

Post by Mike Mille » Thu, 18 Jan 2001 12:52:06


echo "/usr/local/pgsql/lib" >> /etc/ld.so.conf
ldconfig -v

[note >> means APPEND]

That should fix it
--
Mike



> Hi,

> I need to back up my database "test" at 23:30
> everyday.

> $ crontab -l
> 30 23 * * * pg_dump test > test.out

> I got an error massage
> /bin/sh: pg_dump: command not found

> $ which pg_dump
> /usr/local/pgsql/bin/pg_dump

> 30 23 * * * /usr/local/pgsql/bin/pg_dump test >
> /home/iwan/test.out

> I got another error message
> /usr/local/pgsql/bin/pgdump: error in loading shared
> libraries: libpq.so.2.0: cannot open shared object
> file: No such file or directory

> But in my machine libpq.so.2.0 located in
> /usr/local/src/postgresql-6.5.2/src/interface/libpq/libpq.so.2.0
> /usr/local/pgsql/lib/libpq.so.2.0

> What's wrong? Please help me ...

> Thanks in advance
> Iwan

> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/


 
 
 

>>>>> pg_dump in crontab

Post by Mike Mille » Thu, 18 Jan 2001 12:58:15


thats assuming linux (gotta mention that)
--
Mike


> echo "/usr/local/pgsql/lib" >> /etc/ld.so.conf
> ldconfig -v

> [note >> means APPEND]

> That should fix it
> --
> Mike



> > Hi,

> > I need to back up my database "test" at 23:30
> > everyday.

> > $ crontab -l
> > 30 23 * * * pg_dump test > test.out

> > I got an error massage
> > /bin/sh: pg_dump: command not found

> > $ which pg_dump
> > /usr/local/pgsql/bin/pg_dump

> > 30 23 * * * /usr/local/pgsql/bin/pg_dump test >
> > /home/iwan/test.out

> > I got another error message
> > /usr/local/pgsql/bin/pgdump: error in loading shared
> > libraries: libpq.so.2.0: cannot open shared object
> > file: No such file or directory

> > But in my machine libpq.so.2.0 located in
> > /usr/local/src/postgresql-6.5.2/src/interface/libpq/libpq.so.2.0
> > /usr/local/pgsql/lib/libpq.so.2.0

> > What's wrong? Please help me ...

> > Thanks in advance
> > Iwan

> > __________________________________________________
> > Do You Yahoo!?
> > Get email at your own domain with Yahoo! Mail.
> > http://personal.mail.yahoo.com/

 
 
 

>>>>> pg_dump in crontab

Post by Oliver Elphic » Thu, 18 Jan 2001 17:56:41


  >$ crontab -l
  >30 23 * * * pg_dump test > test.out
  >
  >I got an error massage
  >/bin/sh: pg_dump: command not found
  >
  >$ which pg_dump
  >/usr/local/pgsql/bin/pg_dump

cron has a very limited search list for executables; you should set PATH
in the command or use the full pathname for pg_dump:

  30 23 * * * /usr/local/pgsql/bin/pg_dump test > test.out

or

  30 23 * * * PATH=/usr/local/pgsql/bin:$PATH pg_dump test > test.out

--

Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "And, behold, I come quickly; and my reward is with me,
      to give every man according as his work shall be."    
                               Revelation 22:12

 
 
 

>>>>> pg_dump in crontab

Post by Joseph Shraibm » Fri, 19 Jan 2001 08:13:08


Or do what I do
30 23 * * * ~/.bashrc ; /usr/local/pgsql/bin/pg_dump test > test.out

assuming you use bash, of course.



>   >$ crontab -l
>   >30 23 * * * pg_dump test > test.out

>   >I got an error massage
>   >/bin/sh: pg_dump: command not found

>   >$ which pg_dump
>   >/usr/local/pgsql/bin/pg_dump

> cron has a very limited search list for executables; you should set PATH
> in the command or use the full pathname for pg_dump:

>   30 23 * * * /usr/local/pgsql/bin/pg_dump test > test.out

> or

>   30 23 * * * PATH=/usr/local/pgsql/bin:$PATH pg_dump test > test.out

> --

> Isle of Wight                              http://www.lfix.co.uk/oliver
> PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
> GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
>                  ========================================
>      "And, behold, I come quickly; and my reward is with me,
>       to give every man according as his work shall be."
>                                Revelation 22:12

--
Joseph Shraibman

Increase signal to noise ratio.  http://www.targabot.com
 
 
 

1. >>>>> pg_dump in crontab

Hi Mike,

That's right .... thanks.

Another problem :-(
In my computer "pg_dump"; "psql" and "destroydb" are
located in
/usr/ local/pgsql/bin

$ crontab -l
35 23 * * * /usr/local/pgsl/bin/destroydb test

An error message occured
/usr/local/pgsql/bin/destroydb: psql: command not
found destroydb: database destroy failed on test.

Could you fix it?

T.I.A.
Iwan


/usr/local/src/postgresql-6.5.2/src/interface/libpq/libpq.so.2.0

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/

2. copy to windows clipboard...

3. Delphi>>>>>>>

4. I Am Very Sorry!!!

5. >>>SYBASE/UNIX ENIGNEERS WANTED>>>>Bay Area, CA.

6. Maximum of 16 tables/views in FROM clause

7. >>>>>>UNIX/SYBASE ENGINEERS WANTED>>>>>> Bay Area, CA

8. Need Help on ObjectPAL

9. Check out the Web below for great Computer Prices >>>>>>>>>>>>

10. ------>>>>>>CASH IN ON THE NET

11. >>>>> ORACLE DBA 24/7/365 SUPPORT >>>>>

12. US-NY: ORACLE DBA >>>>>URGENT