openldap/doc/man/man5/slapd.replog.5
2002-01-04 21:17:25 +00:00

167 lines
4.0 KiB
Groff

.TH SLAPD.REPLOG 5 "20 August 2000" "OpenLDAP LDVERSION"
.\" $OpenLDAP$
.\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.SH NAME
slapd.replog \- slapd replication log format
.SH SYNOPSIS
slapd.replog
slapd.replog.lock
.SH DESCRIPTION
.LP
The file slapd.replog is produced by the stand-alone LDAP daemon,
.IR slapd ,
when changes are made to its local database that are to be
propagated to one or more replica
.IR slapd s.
The file consists of
zero or more records, each one corresponding to a change, addition,
or deletion from the
.I slapd
database. The file is meant to be read
and processed by
.IR slurpd ,
the stand-alone LDAP update replication daemon. The records are
separated by a blank line. Each record has the following format.
.LP
The record begins with one or more lines indicating the replicas
to which the change is to be propagated:
.LP
.nf
replica: <hostname[:portnumber]>
.fi
.LP
Next, the time the change took place given, as the number of seconds since
00:00:00 GMT, Jan. 1, 1970, with an optional decimal extension, in order
to make times unique. Note that slapd does not make times unique, but
slurpd makes all times unique in its copies of the replog files.
.LP
.nf
time: <integer[.integer]>
.fi
.LP
Next, the distinguished name of the entry being changed is given:
.LP
.nf
dn: <distinguishedname>
.fi
.LP
Next, the type of change being made is given:
.LP
.nf
changetype: <[modify|add|delete|modrdn]>
.fi
.LP
Finally, the change information itself is given, the format of which
depends on what kind of change was specified above. For a \fIchangetype\fP
of \fImodify\fP, the format is one or more of the following:
.LP
.nf
add: <attributetype>
<attributetype>: <value1>
<attributetype>: <value2>
...
-
.fi
.LP
Or, for a replace modification:
.LP
.nf
replace: <attributetype>
<attributetype>: <value1>
<attributetype>: <value2>
...
-
.fi
.LP
Or, for a delete modification:
.LP
.nf
delete: <attributetype>
<attributetype>: <value1>
<attributetype>: <value2>
...
-
.fi
.LP
If no \fIattributetype\fP lines are given, the entire attribute is to be
deleted.
.LP
For a \fIchangetype\fP of \fIadd\fP, the format is:
.LP
.nf
<attributetype1>: <value1>
<attributetype1>: <value2>
...
<attributetypeN>: <value1>
<attributetypeN>: <value2>
.fi
.LP
For a \fIchangetype\fP of \fImodrdn\fP, the format is:
.LP
.nf
newrdn: <newrdn>
deleteoldrdn: 0 | 1
.fi
.LP
where a value of 1 for deleteoldrdn means to delete the values
forming the old rdn from the entry, and a value of 0 means to
leave the values as non-distinguished attributes in the entry.
.LP
For a \fIchangetype\fP of \fIdelete\fP, no additional information
is needed in the record.
.LP
The format of the values is the LDAP Directory Interchange Format
described in
.BR ldif (5).
.LP
Access to the \fIslapd.replog\fP file is synchronized through the
use of
.BR flock (3)
on the file \fIslapd.replog.lock\fP. Any process
reading or writing this file should obey this locking convention.
.SH EXAMPLE
The following sample \fIslapd.replog\fP file contains information
on one of each type of change.
.LP
.nf
replica: truelies.rs.itd.umich.edu
replica: judgmentday.rs.itd.umich.edu
time: 797612941
dn: cn=Babs Jensen,dc=example,dc=com
changetype: add
objectclass: person
cn: babs
cn: babs jensen
sn: jensen
replica: truelies.rs.itd.umich.edu
replica: judgmentday.rs.itd.umich.edu
time: 797612973
dn: cn=Babs Jensen,dc=example,dc=com
changetype: modify
add: description
description: the fabulous babs
replica: truelies.rs.itd.umich.edu
replica: judgmentday.rs.itd.umich.edu
time: 797613020
dn: cn=Babs Jensen,dc=example,dc=com
changetype: modrdn
newrdn: cn=Barbara J Jensen
deleteoldrdn: 0
.fi
.SH FILES
slapd.replog
slapd.replog.lock
.SH SEE ALSO
.BR ldap (3),
.BR ldif (5),
.BR slapd (8),
.BR slurpd (8)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.