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

Re: [openldap 2.1.12 + Berkeley 4.1.24] "warm" backup ?



Else I know that I can use the "ldapsearch" command from the rootdn to
"warm" save regularly my databases but the problem is
that the resulting file is not a ldif file and so I have to convert it
into correct ldif format.


As Peter said, try -L or -LLL to remove ldifv3 comments. This will look much more like you would expect.


Also consider specifying attributes of \* +

* specifies "ALL" attributes, but needs to be escaped in most shells.
+ specifies subschema attributes, like modification times.

The result will be mostly suitable for loading with slapadd on another server or for disaster recovery.

Some sites use CVS or equivalent on the LDIF to archive incremental database changes over time...

If you want to normalize this file, check out some of the tools bundled with perldap. In particular, ldifsort.pl is very handy, especially if you modify it to sort by DN structurally.

Matthew Backes
lucca@csun.edu