[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: slapcat run by cronjob

Thanks Gary, you are right, after adding
the full path it works!


Tay, Gary wrote:

Check the enviroment variables when in terminal mode, especially PATH
and LD_LIBRARY_PATH, you need to modify your script to incorporate
these, I think.


-----Original Message-----
From: owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org] On Behalf Of Bala
Sent: Monday, March 28, 2005 3:09 PM
To: openldap-software@OpenLDAP.org
Subject: slapcat run by cronjob

Hi All, I have simple script to take back up our openldap server using slapcat, as shown below

#!/bin/bash cd /root
TEST=$(echo "test-$(date +%y%m%d%M).ldif")
touch $LDIF
LDIFFILE=$(echo "openldap-backup-$(date
slapcat -l $LDIFFILE
mv $TEST /root/backup
mv $LDIFFILE /root/backup

this will work if I run from terminal, I am getting
the ldif file with all the data.

If I put the same script under cron, I am not getting any ldif file also no log messages, since test file is there under backup, I am sure cron job is running.

how to achive slapcat using cron job, anybody using
like this??, how to do that??

thanks in advance,

__________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site!

[This e-mail is confidential and may be priviledged. If you are not the intended recipient, please kindly notify us immediately and delete the message from your system; please do not copy or use it for any purpose, nor disclose its contents to any other person. Thank you.] ---ST Electronics Group---