[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Backing up LDAP database

At 09:41 AM 9/30/99 +1000, Andrew Kemp wrote:
>/usr/local/sbin/ldbmcat -n db/id2entry.gdbm > bak/backup.ldif
>However, with NO users connected to the database (ie: just started and
>only known to the developers), when I run this command I get the
>following :  "db/id2entry.gdbm: Operation would block"

Users don't connect to the database, slapd does.  The LDBM
backend uses file locking to keep folks from running LDBM
tools are active databases.

The "proper" way to do a back up is to:
 1) shutdown slapd
 2) copy database using either
       a) cp -r dbdir savedir
       b) cp dbdir/id2entry.* savedir
 3) restart slapd

You can generate an LDIF from the copy if you desire, but I
generally just archive a copy if id2entry.