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

Re: back-config again



One thing I hope will remain fairly easy to do automatically, and to
administer, is to build a fresh database "outside" the running slapd,
and then take slapd down to replace the database.  That is,

  Given a database in directory 'DBDIR',

  mkdir DBDIR-new,
  sed 's!DBDIR!DBDIR-new!' < slapd.conf > slapd.conf.tmp,
  slapadd -f slapd.conf.tmp,

  kill slapd and wait for its death,
  mv DBDIR DBDIR-old,
  mv DBDIR-new DBDIR,
  start slapd.

Well, it's a bit more robust than that:-) and there are several
databases in slapd.conf.

-- 
Hallvard