Hi, Anyone knows how i can setup replication from the command line instead of using the console?
thanks
---------------------------- Patricio Bruna V. Red Hat Certified Engineer IT Linux Ltda. http://www.it-linux.cl Fono : (+56-2) 333 0051 Cel : (+56-09) 8288 5195
Patricio A. Bruna wrote:
Hi, Anyone knows how i can setup replication from the command line instead of using the console?
Yes. http://directory.fedora.redhat.com/wiki/Howto:MultiMasterReplication
thanks
Patricio Bruna V. Red Hat Certified Engineer IT Linux Ltda. http://www.it-linux.cl Fono : (+56-2) 333 0051 Cel : (+56-09) 8288 5195
-- Fedora-directory-users mailing list Fedora-directory-users@redhat.com https://www.redhat.com/mailman/listinfo/fedora-directory-users
i couldn't download the mmr.pl script. By the way, i need to set up the replica (in silent mode) in the consumer and then initialize the replica, also in silent modem. Can this be made from script?
----- Original Message ----- From: Pete Rowley prowley@redhat.com To: General discussion list for the Fedora Directory server project. fedora-directory-users@redhat.com Sent: jueves 21 de septiembre de 2006 17H14 GMT-0400 Subject: Re: [Fedora-directory-users] Command line replication setup
Patricio A. Bruna wrote: Hi, Anyone knows how i can setup replication from the command line instead of using the console?
Yes. thanks
---------------------------- Patricio Bruna V. Red Hat Certified Engineer IT Linux Ltda. http://www.it-linux.cl Fono : (+56-2) 333 0051 Cel : (+56-09) 8288 5195
-- Fedora-directory-users mailing list Fedora-directory-users@redhat.com https://www.redhat.com/mailman/listinfo/fedora-directory-users
Patricio A. Bruna wrote:
Hi, Anyone knows how i can setup replication from the command line instead of using the console?
Sure. First thing, create a replication account on the consumer:
ldapmodify -h consumer <<EOF dn: cn=replication manager,cn=replication,cn=config changetype: add cn: replication manager sn: replication objectClass: top objectClass: person userPassword: mypassword EOF
You'll also need to configure the consumer's database to enable replication. Replace @DCROOT@ with the DN of the database you want to replicate:
ldapmodify -h consumer <<EOF dn: cn=replica, cn="@DCROOT@", cn=mapping tree, cn=config changetype: add objectClass: nsDS5Replica objectClass: top cn: replica nsDS5ReplicaBindDN: cn=replication manager, cn=replication, cn=config nsDS5ReplicaRoot: @DCROOT@ nsDS5Flags: 0 nsDS5ReplicaType: 2 nsDS5ReplicaId: 65535 EOF
If you haven't enabled the changelog on your supplier, you'll need to do that:
ldapmodify -h supplier <<EOF dn: cn=changelog5,cn=config changetype: add objectClass: top objectClass: extensibleObject cn: changelog5 nsslapd-changelogdir: /opt/fedora-ds/slapd-master1/changelogdb nsslapd-changelogmaxage: 7d EOF
...and if you haven't set it up as a replica yet, you'd need to make that database a supplier. This modification is similar to marking the consumer database, above. Replace @DCROOT@ with the DN of the database you want to replicate. If you're doing multiple master servers, note nsDS5ReplicaId must be unique among the servers.
ldapmodify -h supplier <<EOF dn: cn=replica,cn="@DCROOT@",cn=mapping tree,cn=config changetype: add objectClass: nsDS5Replica objectClass: top nsDS5ReplicaRoot: @DCROOT@ nsDS5ReplicaType: 3 nsDS5Flags: 1 nsDS5ReplicaId: 12 nsds5ReplicaPurgeDelay: 604800 nsDS5ReplicaBindDN: cn=replication manager, cn=replication, cn=config cn: replica EOF
And, finally, you'll need to add the replication agreement on the master server. Again, replace @DCROOT@ with your DB's DN, and replace @HOSTNAME@ with the hostname of the consumer server:
ldapmodify -h supplier <<EOF dn: cn=@HOSTNAME@:389, cn=replica, cn="@DCROOT@", cn=mapping tree, cn=config changetype: add objectClass: top objectClass: nsDS5ReplicationAgreement description: Replication agreement with @HOSTNAME@ cn: @HOSTNAME@:389 nsDS5ReplicaRoot: @DCROOT@ nsDS5ReplicaHost: @HOSTNAME@ nsDS5ReplicaPort: 389 nsDS5ReplicaBindDN: cn=replication manager, cn=replication, cn=config nsDS5ReplicaBindMethod: SIMPLE nsDS5ReplicaCredentials: mypassword
dn: cn=@HOSTNAME@:389, cn=replica, cn="@DCROOT@", cn=mapping tree, cn=config changetype: modify replace: nsds5BeginReplicaRefresh nsds5BeginReplicaRefresh: start EOF
The only caveat is that I normally capture these items using the audit log, so the password values I have in my reference files are encrypted or hashed already. I *believe* that using plaintext values will work, and that the directory server will Do The Right Thing with them, but I could be wrong.
Gordon, Thank you very much. I will try this. The initialization of the consumer i should do it with ldif2db.pl?
----- Original Message ----- From: Gordon Messmer gmessmer@u.washington.edu To: General discussion list for the Fedora Directory server project. fedora-directory-users@redhat.com Sent: viernes 22 de septiembre de 2006 12H55 GMT-0400 Subject: Re: [Fedora-directory-users] Command line replication setup
Patricio A. Bruna wrote:
Hi, Anyone knows how i can setup replication from the command line instead of using the console?
Sure. First thing, create a replication account on the consumer:
ldapmodify -h consumer <<EOF dn: cn=replication manager,cn=replication,cn=config changetype: add cn: replication manager sn: replication objectClass: top objectClass: person userPassword: mypassword EOF
You'll also need to configure the consumer's database to enable replication. Replace @DCROOT@ with the DN of the database you want to replicate:
ldapmodify -h consumer <<EOF dn: cn=replica, cn="@DCROOT@", cn=mapping tree, cn=config changetype: add objectClass: nsDS5Replica objectClass: top cn: replica nsDS5ReplicaBindDN: cn=replication manager, cn=replication, cn=config nsDS5ReplicaRoot: @DCROOT@ nsDS5Flags: 0 nsDS5ReplicaType: 2 nsDS5ReplicaId: 65535 EOF
If you haven't enabled the changelog on your supplier, you'll need to do that:
ldapmodify -h supplier <<EOF dn: cn=changelog5,cn=config changetype: add objectClass: top objectClass: extensibleObject cn: changelog5 nsslapd-changelogdir: /opt/fedora-ds/slapd-master1/changelogdb nsslapd-changelogmaxage: 7d EOF
...and if you haven't set it up as a replica yet, you'd need to make that database a supplier. This modification is similar to marking the consumer database, above. Replace @DCROOT@ with the DN of the database you want to replicate. If you're doing multiple master servers, note nsDS5ReplicaId must be unique among the servers.
ldapmodify -h supplier <<EOF dn: cn=replica,cn="@DCROOT@",cn=mapping tree,cn=config changetype: add objectClass: nsDS5Replica objectClass: top nsDS5ReplicaRoot: @DCROOT@ nsDS5ReplicaType: 3 nsDS5Flags: 1 nsDS5ReplicaId: 12 nsds5ReplicaPurgeDelay: 604800 nsDS5ReplicaBindDN: cn=replication manager, cn=replication, cn=config cn: replica EOF
And, finally, you'll need to add the replication agreement on the master server. Again, replace @DCROOT@ with your DB's DN, and replace @HOSTNAME@ with the hostname of the consumer server:
ldapmodify -h supplier <<EOF dn: cn=@HOSTNAME@:389, cn=replica, cn="@DCROOT@", cn=mapping tree, cn=config changetype: add objectClass: top objectClass: nsDS5ReplicationAgreement description: Replication agreement with @HOSTNAME@ cn: @HOSTNAME@:389 nsDS5ReplicaRoot: @DCROOT@ nsDS5ReplicaHost: @HOSTNAME@ nsDS5ReplicaPort: 389 nsDS5ReplicaBindDN: cn=replication manager, cn=replication, cn=config nsDS5ReplicaBindMethod: SIMPLE nsDS5ReplicaCredentials: mypassword
dn: cn=@HOSTNAME@:389, cn=replica, cn="@DCROOT@", cn=mapping tree, cn=config changetype: modify replace: nsds5BeginReplicaRefresh nsds5BeginReplicaRefresh: start EOF
The only caveat is that I normally capture these items using the audit log, so the password values I have in my reference files are encrypted or hashed already. I *believe* that using plaintext values will work, and that the directory server will Do The Right Thing with them, but I could be wrong.
389-users@lists.fedoraproject.org