Is there a way to recover the ldap server if it crashes
Depends what's wrong with it. More detail is needed.
A better question might be "Do you have backups?"
I do have backups. I restore it from backups and it fixes it but whenever I reboot again the ldap crashes
Crashes in what fashion? More detail is needed.