1
votes

Does anyone know a foolproof way of taking ApacheDS backup? This is what I have tried:

  1. Tried taking the "LDIF export" from ApacheDS Studio. However, the export does not have proper tree structure and hence restoration always fails. This can be avoided by manually arranging the lines inside the LDIF file. However, this is highly error prone and would be really difficult to script even with the best knowledge of REGEX and File handing..
    • Besides, there is no programmatic way of taking the "LDIF Export" in first place. This has to be done manually from ApacheDS studio (an Eclipse like application)
  2. Another way I tried was to take raw files from /var/lib/apacheds-2.0.0-M15/default/partitions and restore it as it is to a fresh installation of ApacheDS. However, after this, the ApacheDS service fails to start.
    • I got the service running fine using the raw LDAP files. This was possible only after uninstalling apacheds-2.0.0-M15-amd64.deb and installing the latest available version apacheds-2.0.0-M19-amd64.deb. However, the custom partition does not show up in the ApacheDS Studio. huh...
  3. https://directory.apache.org/apacheds/kerberos-ug/3.6-backup-restore.html is no help
  4. I do not want what is mentioned in https://serverfault.com/a/331652/114516
  5. I saw taking ldap dump using about apacheds-tools.jar from https://cwiki.apache.org/confluence/display/DIRxSRVx10/2.1.2.+ApacheDS+tools. However, For the love God, I am not able to find where to download that jar file from.

FWIW, I do not know java programming at all.

1
Did you make some progress on that topic so far? Before starting ApacheDS in a productive surrounding there must be the option to backup the db automated.Inceddy

1 Answers

1
votes

So I cracked it in a crude way. But it works:

  • tar up the respective partition folder located under /var/lib/apacheds-2.0.0-MXX/default/partitions
  • Install acheds-2.0.0-M19 on a new machine. I could get my backup work only with this version. No idea why it failed on other version (before and after of version 2.0.0-M19)
  • untar your backed up partition to /var/lib/apacheds-2.0.0-M19/default/partitions
  • Restart ApacheDS Service
  • Now, from a windows box, connect to ApacheDS using ApacheDS Studio and create partition. Make sure to provide exact same name to the aprtition as that off your older server ApacheDS partition.
  • Restart ApacheDS service.
  • That's it

I have tried, tested and have verified above method many times and it worked all the time. I am happy.