On 12/16/10 4:59 PM, John Cheng wrote:
On Wed, Dec 15, 2010 at 8:41 PM, Kiran Ayyagari<[email protected]>  wrote:
On Thu, Dec 16, 2010 at 3:52 AM, John Cheng<[email protected]>  wrote:
Apologize for the newbie question. But, I have small instance of ApcheDS
running and I would like to make sure my data gets backed up. Is this as
simple as just copying the partitions folder or???
The best would be to run a cron task (on linux) to get all the entries
extracted as LDIF, say, every hour. This is a guaranteed way to get
your data straight.

Hi Emmanuel,

Is the apacheds-tools.jar capable of doing backup/restores? A search on
the archives seem to indicate that it is broken and one should use
OpenLdap tools to perform backup/restore via the command line

http://web.archiveorange.com/archive/v/DCLZ8EQq6MXcLPfXYRB3

Trying the command

java -jar apacheds-tools.jar dump -i /path/to/apacheds -p system

Yielded java.lang.ClassNotFoundException:
org.apache.directory.daemon.InstallationLayout

the best is to export all the data into a LDIF file and use as backup.
yes the server-tools is broken and is not supported at the moment

On a subject that relates to backups, is replication not working in
ApacheDS 1.5.7?
no, it is not working in 1.5.7 but the trunk has support for
master/slave replication (rfc4533 a.k.a syncrepl)
may be you can consider upgrading your server to the latest in a dev
environment and see

--
Kiran Ayyagari
I am looking into using ApacheDS as a production LDAP server and I am
trying to find an export tool that is both Java-based and can be
scripted. Is there a pure Java export tool?

ApacheDS Studio is Java but is a GUI.

OpenDS is Java but only works with OpenDS from what I can gather.

OpenLDAP's "ldapsearch" is a command line tool, but is not based on
Java.

So my only option is OpenLDAP tools, I would like to avoid that
dependency if possible.
Writing a java class that export the full tree is a matter of 12 lines of Java code :

    private void dumpBase() throws Exception
    {
LdapConnection connection = new LdapNetworkConnection( "localhost", "10389" );
        conn.bind( "uid=admin,ou=system", "secret" );

SearchCursor cursor = connection.search( DN.EMPTY_DN , "(ObjectClass=*)", SearchScope.SUBTREE, "*", "+" );

        while ( cursor.next() )
        {
System.out.println( LdifUtils.convertEntryToLdif( ((SearchResultEntry)cursor.get()).getEntry() ) );
        }
    }


--
---
John L Cheng



--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to