As for backing up OD, well...
See
http://www.google.com/search?q=OpenDirectorybackup
the afp548.com article is a good reference (script from Joel Rennich) but is geared towards 10.3 (probably works for 10.4) but, also look at the "Anonymous" reply there (another script),
which I believe (not 100 % sure) was Michael Bartosh (RIP) - author of the invaluable
http://oreilly.com/catalog/9780596006358/
which does not attempt to stop slapd. Besides, 10.5 does
not use SystemStarter for slapd,
that is handled now by launchd. Ideally, yes, you want to make sure you stop slapd
to ensure the consistency of the backup. You'll have to adjust and use launchctl then.
When you use the GUI in
10.4 (I've not had a chance to monitor this same process in 10.5) to do a backup via Server Admin, the initial steps it actually takes are as follows:
1 Backing up LDAP database
slapconfig -backupdb
/usr/sbin/slapcat -l /tmp/slapconfig
backupstage/backup.ldif
/bin/cp -r /etc/openldap /tmp/slapconfig
backupstage/
2 Backing up password server database
/usr/sbin/mkpassdb -backupdb /tmp/slapconfig
backup_stage/passwordserverbackup/ > /dev/null
/bin/hostname > /tmp/slapconfig
backupstage/hostname
/usr/sbin/sso_util info -pr /LDAPv3/127.0.0.1 > /tmp/slapconfig
backup_stage/localkrb5realm
3 Backing up Kerberos database
/usr/sbin/mkpassdb -list > /tmp/slapconfig
backupstage/sasl-plugin-list
/usr/sbin/kdb5_util dump > /tmp/slapconfig
backupstage/kdb5dump.bak
(err, BAD line-wraps, let me try to fix this):
4 Backing up configuration files
/usr/bin/tar czpf /tmp/slapconfigbackupstage/krb5backup.tar.gz /var/db/krb5kdc/kdc.conf /var/db/krb5kdc/kadm5.acl /var/db/krb5kdc/kadm5.keytab /var/db/krb5kdc/.k5.* /Library/Preferences/edu.mit.Kerberos /etc/krb5.keytab
/bin/cp /System/Library/LaunchDaemons/com.apple.PasswordService.xml /tmp/slapconfig
backupstage/LaunchDaemons/
/bin/cp /System/Library/LaunchDaemons/org.openldap.slapd.xml /tmp/slapconfig
backupstage/LaunchDaemons/
More here:
http://www.afp548.com/article.php?story=20050615173039158
http://www.barbariangroup.com/posts/840-migratingusers_from_a_tiger_server_to_a_clean_leopardserver