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

RE: slapcat run by cronjob



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.

Gary

-----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
+%y%m%d).ldif")
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,
-bala-




		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/