Before you start moving anything around, first stop LDAP:
launchctl stop org.openldap.slapd
To move the LDAP database for Open Directory, just use the following command (assuming you would like to save to /Volumes/target/openldap/data – although you can use another URI if you choose):
cp -prnv /var/db/openldap/data /Volumes/target/openldap/data
Once moved you can alter the location that Mac OS X Server looks for the data by typing in a new path using the LDAP tab of the Open Directory listing in the SERVERS list of Server Admin. Once you’re all done, fire up LDAP again using the following command and test:
launchctl start org.openldap.slapd