Backup Script

Andreas John <[email protected]> Fri, 20 May 2005 17:11:35 +0200
Newsgroups gmane.comp.isp.ispman.user
Message-ID <[email protected]>
Hello!

Someone wrote:
>      mkdir -p "$basedir/$date";
>      # do backup!!!
>      cmd="$slapcat -f $conf -b $suffix -l $file";
>      logger $cmd;
>      $cmd;
> }


Without following the thread I add: If you use slapcat, you have to stop
slapd. Otherwise you cannot be sure that the files are not corrupted.
If you use ldapsearch instead, slapd must be running. But I heared
rumors, that there may be a point where large LDAP DBs won't we dumped
completely under certain circumstances. I did not follow the initial
discussion about that, I may be fixed meanwhile.

> # function to do the backup recover.
> function cmd_reconver(){
>      echo ": $1";
>      file="$basedir/$1/backup.ldif";
>      cmd="$slapadd -f $conf -b $suffix -l $file";
>      logger $cmd;
>      $cmd;

Did you every try to recover with this script? AFAIR you have to delete
   /var/lib/ldap/ (or whatever your distro uses) - I mean the directory,
not only the content of the dir. Elsewise slapadd can't restore beacuse
it conatins timestamps, which are immutable and thus cant be inserted.

But anyway: Nice scipt ;) Maybe we should produce an example backup
script like yours and include it into ISPMAN CVS als "contrib" or so?

rgds,
Andreas



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click