mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
a8574a450f
new slapadd options -p : promote : If the ldif file contains syncConsumerSubentries, convert them to a single syncProviderSubentry. Its contextCSN attribute has the largest value of the syncreplCookie attributes of the syncConsumerSubentries. syncProviderSubentry in the ldif file is retained. -p -w : promote : Recalculate contextCSN based on entryCSN of each entry. create Existing syncConsumerSubentries and syncProviderSubentry are ignored and not added to the directory. -r : demote : If the ldif file contains syncProviderSubentry, convert it to a syncConsumerSubentry having the default syncrepl id of 0. syncConsumerSubentries in the ldif file are retained. -r -w : demote : Recalculate syncreplCookie based on entryCSN of each entry. create Existing syncConsumerSubentries and syncProviderSubentry are ignored and not added to the directory. The default syncrepl id of 0 will be used for the new syncConsumerSubentry. -r -w -i %d[,%d]* : Using the comma separated list followed by the -i option, it is possible to create multiple syncConsumerSubentries having the syncrepl ids specified in the list. syncreplCookie values of these sycnConsumerSubentries will have the same value, either from the maximum entryCSN value or from the contextCSN value of the syncProviderSubentry.
54 lines
1.2 KiB
C
54 lines
1.2 KiB
C
/* $OpenLDAP$ */
|
|
/*
|
|
* Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
|
|
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
|
*/
|
|
/* slapcommon.h - common definitions for the slap tools */
|
|
|
|
#ifndef SLAPCOMMON_H_
|
|
#define SLAPCOMMON_H_ 1
|
|
|
|
#define SLAPD_TOOLS 1
|
|
#include "../slap.h"
|
|
|
|
enum slaptool {
|
|
SLAPCAT=1, /* database -> LDIF tool */
|
|
SLAPADD, /* LDIF -> database tool */
|
|
SLAPINDEX, /* database index tool */
|
|
SLAPTEST /* database testing tool */
|
|
};
|
|
|
|
#define SLAP_TOOL_CTXCSN_KEEP 0
|
|
#define SLAP_TOOL_CTXCSN_ENTRY 1
|
|
#define SLAP_TOOL_CTXCSN_BATCH 2
|
|
|
|
extern char *progname;
|
|
extern char *conffile;
|
|
extern Backend *be;
|
|
extern int appendmode;
|
|
extern int verbose;
|
|
extern int update_ctxcsn;
|
|
extern int retrieve_ctxcsn;
|
|
extern int retrieve_synccookie;
|
|
extern int replica_promotion;
|
|
extern int replica_demotion;
|
|
extern char *replica_id_string;
|
|
extern char **replica_id_strlist;
|
|
extern int *replica_id_list;
|
|
extern int continuemode;
|
|
extern int nosubordinates;
|
|
extern int dryrun;
|
|
extern struct berval sub_ndn;
|
|
|
|
extern char *ldiffile;
|
|
extern FILE *ldiffp;
|
|
|
|
void slap_tool_init LDAP_P((
|
|
const char* name,
|
|
int tool,
|
|
int argc, char **argv ));
|
|
|
|
void slap_tool_destroy LDAP_P((void));
|
|
|
|
#endif /* SLAPCOMMON_H_ */
|