You can perform an online binary backup with dsconf or by using the Directory Service Control Center (DSCC).
For example, to back up master sA1 and store the resulting binary backup in the /install-path/sA1-bak directory, run the following command:
$ dsconf backup -p 20390 /install-path/sA1-bak
Use the -a or --async option to start a backup task that returns immediately.