]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd.replog.5
ddbcbc73d2a58156d4dd660ab955e8affa921982
[openldap] / doc / man / man5 / slapd.replog.5
1 .TH SLAPD.REPLOG 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2005 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 slapd.replog \- slapd replication log format
7 .SH SYNOPSIS
8 slapd.replog
9 slapd.replog.lock
10 .SH DESCRIPTION
11 .LP
12 The file slapd.replog is produced by the stand-alone LDAP daemon,
13 .BR slapd (8),
14 when changes are made to its local database that are to be
15 propagated to one or more replica
16 .IR slapd s.
17 The file consists of
18 zero or more records, each one corresponding to a change, addition,
19 or deletion from the
20 .I slapd
21 database.  The file is meant to be read
22 and processed by
23 .BR slurpd (8),
24 the stand-alone LDAP update replication daemon.  The records are
25 separated by a blank line.  Each record has the following format.
26 .LP
27 The record begins with one or more lines indicating the replicas
28 to which the change is to be propagated:
29 .LP
30 .nf
31         replica: <hostname[:portnumber]>
32 .fi
33 .LP
34 Next, the time the change took place given, as the number of seconds since
35 00:00:00 GMT, Jan. 1, 1970, with an optional decimal extension, in order
36 to make times unique.  Note that slapd does not make times unique, but
37 slurpd makes all times unique in its copies of the replog files.
38 .LP
39 .nf
40         time: <integer[.integer]>
41 .fi
42 .LP
43 Next, the distinguished name of the entry being changed is given:
44 .LP
45 .nf
46         dn: <distinguishedname>
47 .fi
48 .LP
49 Next, the type of change being made is given:
50 .LP
51 .nf
52         changetype: <[modify|add|delete|modrdn]>
53 .fi
54 .LP
55 Finally, the change information itself is given, the format of which
56 depends on what kind of change was specified above.  For a \fIchangetype\fP
57 of \fImodify\fP, the format is one or more of the following:
58 .LP
59 .nf
60         add: <attributetype>
61         <attributetype>: <value1>
62         <attributetype>: <value2>
63         ...
64         -
65 .fi
66 .LP
67 Or, for a replace modification:
68 .LP
69 .nf
70         replace: <attributetype>
71         <attributetype>: <value1>
72         <attributetype>: <value2>
73         ...
74         -
75 .fi
76 .LP
77 Or, for a delete modification:
78 .LP
79 .nf
80         delete: <attributetype>
81         <attributetype>: <value1>
82         <attributetype>: <value2>
83         ...
84         -
85 .fi
86 .LP
87 If no \fIattributetype\fP lines are given, the entire attribute is to be
88 deleted.
89 .LP
90 For a \fIchangetype\fP of \fIadd\fP, the format is:
91 .LP
92 .nf
93         <attributetype1>: <value1>
94         <attributetype1>: <value2>
95         ...
96         <attributetypeN>: <value1>
97         <attributetypeN>: <value2>
98 .fi
99 .LP
100 For a \fIchangetype\fP of \fImodrdn\fP, the format is:
101 .LP
102 .nf
103         newrdn: <newrdn>
104         deleteoldrdn: 0 | 1
105 .fi
106 .LP
107 where a value of 1 for deleteoldrdn means to delete the values
108 forming the old rdn from the entry, and a value of 0 means to
109 leave the values as non-distinguished attributes in the entry.
110 .LP
111 For a \fIchangetype\fP of \fIdelete\fP, no additional information
112 is needed in the record.
113 .LP
114 The format of the values is the LDAP Directory Interchange Format
115 described in
116 .BR ldif (5).
117 .LP
118 Access to the \fIslapd.replog\fP file is synchronized through the
119 use of
120 .BR flock (3)
121 on the file \fIslapd.replog.lock\fP.  Any process
122 reading or writing this file should obey this locking convention.
123 .SH EXAMPLE
124 The following sample \fIslapd.replog\fP file contains information
125 on one of each type of change.
126 .LP
127 .nf
128         replica: truelies.rs.itd.umich.edu
129         replica: judgmentday.rs.itd.umich.edu
130         time: 797612941
131         dn: cn=Babs Jensen,dc=example,dc=com
132         changetype: add
133         objectclass: person
134         cn: babs
135         cn: babs jensen
136         sn: jensen
137          
138         replica: truelies.rs.itd.umich.edu
139         replica: judgmentday.rs.itd.umich.edu
140         time: 797612973
141         dn: cn=Babs Jensen,dc=example,dc=com
142         changetype: modify
143         add: description
144         description: the fabulous babs
145          
146         replica: truelies.rs.itd.umich.edu
147         replica: judgmentday.rs.itd.umich.edu
148         time: 797613020
149         dn: cn=Babs Jensen,dc=example,dc=com
150         changetype: modrdn
151         newrdn: cn=Barbara J Jensen
152         deleteoldrdn: 0
153 .fi
154 .SH FILES
155 .TP
156 slapd.replog
157 slapd replication log file
158 .TP
159 slapd.replog.lock
160 lockfile for slapd.replog
161 .SH SEE ALSO
162 .BR ldap (3),
163 .BR ldif (5),
164 .BR slapd (8),
165 .BR slurpd (8)
166 .SH ACKNOWLEDGEMENTS
167 .B OpenLDAP
168 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
169 .B OpenLDAP
170 is derived from University of Michigan LDAP 3.3 Release.