It seems that it's the 'slapcat' which fails, not the 'ldap restart'.
Maybe your ldap database is corrupted ...
You can also save a ldap database with copying it's files but the server
has to be stoped before :
/etc/init.d/ldap stop
cp -R /var/lib/ldap/* /etc/bacula/ldap_backup/
/etc/init.d/ldap start
and to restore :
/etc/init.d/ldap stop
rm -f /var/lib/ldap/*
cp -f /etc/bacula/ldap_backup/* /var/lib/ldap/
chown -R ldap.ldap /var/lib/ldap/
/etc/init.d/ldap start
or simply add /var/lib/ldap in your FileSet
Le jeudi 27 octobre 2005 à 08:52 -0700, Paul Heinlein a écrit :
> On Thu, 27 Oct 2005, Josh Fisher wrote:
>
> > I have a problem with the following ClientRunBeforeJob script
> > running on a Fedora Core 3 client machine using bacula-fd version
> > 1.36.3.
> >
> > #!/bin/sh
> > ldapbak=/etc/bacula/ldap_backup.ldif
> > rm -f $ldapbak
> > /etc/init.d/ldap stop &>/dev/null
> > slapcat -l $ldapbak
> > ret=$?
> > /etc/init.d/ldap start
> > if [ "$ret" != "0" ]; then
> > exit 1
> > fi
> > exit 0
> >
> > On the client machine, bacula-fd runs as user root and group bacula.
> > The slapcat command fails when the job is started from bconsole,
> > returns "slap_startup failed" message, and cancels the job due to
> > the script returning non-zero. However, I can manually run the
> > script from a shell on the client machine without issue. Any idea
> > what I'm doing wrong?
>
> Instead of invoking the init script directly, try using the
> /sbin/service wrapper script. It'll setup your environment correctly,
> which might not be happening in the bacula app space.
>
> Instead of
>
> /etc/init.d/ldap {start,stop}
>
> do
>
> /sbin/service ldap {start,stop}
>
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users