Hi, I am trying to create new ldap database on new machine and I want to transfer full ldap database from old machine to new machine. Can I just transfer all the database files (.bdb,_db,alock) and expect new database to be at the same stage of old database??
Thanks in advance.
Regards, Mukim Pathan
wouldn't it be safer and easier to run slapcat and slapadd?
Tyler
On Thu, 4 Jun 2009 12:28:21 +0530 mukim pathan mukim.iitkgp@gmail.com wrote:
Hi, I am trying to create new ldap database on new machine and I want to transfer full ldap database from old machine to new machine. Can I just transfer all the database files (.bdb,_db,alock) and expect new database to be at the same stage of old database??
Thanks in advance.
Regards, Mukim Pathan
On Thursday 04 June 2009 08:58:21 mukim pathan wrote:
Hi, I am trying to create new ldap database on new machine and I want to transfer full ldap database from old machine to new machine. Can I just transfer all the database files (.bdb,_db,alock) and expect new database to be at the same stage of old database??
This won't work if: -The version of OpenLDAP is different -The database library version is older on the target -The architectures differ (e.g. x86 vs x86_64).
Even if it does work (none of the above conditions apply), it's still not a good idea to copy the database files directly (as it is non-trivial to get a consistent copy).
As covered in the documentation, the supported method for backing up and restoring data is via slapcat to export, and slapadd to import.
Regards, Buchan
Hi,
Thank you for your inputs, Buchan. Actually what I am trying to do is to recreate the database if my present system fails due to any reason. Since ldap takes a lot of time in recovery for my system(it took 9 hours for 40 million entries and 1200 log files), I am trying to stage up another machine in the mean time as quickly as possible.I tried backing up and then reloading, but it seems to be taking a lot of time in generating the backup. So please let me know any faster solution with which I can recreate my database.
Regards, Mukim Pathan
On Thu, Jun 4, 2009 at 7:49 PM, Buchan Milne bgmilne@staff.telkomsa.netwrote:
On Thursday 04 June 2009 08:58:21 mukim pathan wrote:
Hi, I am trying to create new ldap database on new machine and I want to transfer full ldap database from old machine to new machine. Can I just transfer all the database files (.bdb,_db,alock) and expect new database
to
be at the same stage of old database??
This won't work if: -The version of OpenLDAP is different -The database library version is older on the target -The architectures differ (e.g. x86 vs x86_64).
Even if it does work (none of the above conditions apply), it's still not a good idea to copy the database files directly (as it is non-trivial to get a consistent copy).
As covered in the documentation, the supported method for backing up and restoring data is via slapcat to export, and slapadd to import.
Regards, Buchan
You could make the backup database a slave to your primary database, so that it is constantly being updated. then just switch your config when your primary fails.
-Rex
On Jun 4, 2009, at 11:00 AM, mukim pathan wrote:
Hi,
Thank you for your inputs, Buchan. Actually what I am trying to do is to recreate the database if my present system fails due to any reason. Since ldap takes a lot of time in recovery for my system(it took 9 hours for 40 million entries and 1200 log files), I am trying to stage up another machine in the mean time as quickly as possible.I tried backing up and then reloading, but it seems to be taking a lot of time in generating the backup. So please let me know any faster solution with which I can recreate my database.
Regards, Mukim Pathan
On Thu, Jun 4, 2009 at 7:49 PM, Buchan Milne <bgmilne@staff.telkomsa.net
wrote:
On Thursday 04 June 2009 08:58:21 mukim pathan wrote:
Hi, I am trying to create new ldap database on new machine and I want to transfer full ldap database from old machine to new machine. Can I
just
transfer all the database files (.bdb,_db,alock) and expect new
database to
be at the same stage of old database??
This won't work if: -The version of OpenLDAP is different -The database library version is older on the target -The architectures differ (e.g. x86 vs x86_64).
Even if it does work (none of the above conditions apply), it's still not a good idea to copy the database files directly (as it is non-trivial to get a consistent copy).
As covered in the documentation, the supported method for backing up and restoring data is via slapcat to export, and slapadd to import.
Regards, Buchan
Hi Rex,
How do I do that? If there are any documentation about it then please direct me to that. Thank you in advance.
Regards, Mukim Pathan
On Thu, Jun 4, 2009 at 8:36 PM, Rex Roof rex@wccnet.edu wrote:
You could make the backup database a slave to your primary database, so that it is constantly being updated. then just switch your config when your primary fails.
-Rex
On Jun 4, 2009, at 11:00 AM, mukim pathan wrote:
Hi,
Thank you for your inputs, Buchan. Actually what I am trying to do is to recreate the database if my present system fails due to any reason. Since ldap takes a lot of time in recovery for my system(it took 9 hours for 40 million entries and 1200 log files), I am trying to stage up another machine in the mean time as quickly as possible.I tried backing up and then reloading, but it seems to be taking a lot of time in generating the backup. So please let me know any faster solution with which I can recreate my database.
Regards, Mukim Pathan
On Thu, Jun 4, 2009 at 7:49 PM, Buchan Milne bgmilne@staff.telkomsa.net wrote: On Thursday 04 June 2009 08:58:21 mukim pathan wrote:
Hi, I am trying to create new ldap database on new machine and I want to transfer full ldap database from old machine to new machine. Can I just transfer all the database files (.bdb,_db,alock) and expect new database
to
be at the same stage of old database??
This won't work if: -The version of OpenLDAP is different -The database library version is older on the target -The architectures differ (e.g. x86 vs x86_64).
Even if it does work (none of the above conditions apply), it's still not a good idea to copy the database files directly (as it is non-trivial to get a consistent copy).
As covered in the documentation, the supported method for backing up and restoring data is via slapcat to export, and slapadd to import.
Regards, Buchan
mukim pathan wrote:
Hi Rex,
How do I do that? If there are any documentation about it then please direct me to that. Thank you in advance.
Regards, Mukim Pathan
On Thu, Jun 4, 2009 at 8:36 PM, Rex Roof <rex@wccnet.edu mailto:rex@wccnet.edu> wrote:
You could make the backup database a slave to your primary database, so that it is constantly being updated. then just switch your config when your primary fails. -Rex
Hello,
I believe the answer is here > http://www.openldap.org/doc/admin24/replication.html To be more specific, you will have to take only some parts of Syncrepl proxy. This could give you better look at things > http://www.zytrax.com/books/ldap/ch7/
And also, our configs (for ilustration):
--- master ---- # Indices to maintain index objectClass eq
# Indices for SyncRepl index entryCSN,entryUUID eq
## These indexes are included to support calls such as ## getpwuid( ), getpwnam( ), and ## getgrgid( ). index cn,uid eq index uidNumber eq index gidNumber eq
# Replication - go and get me overlay syncprov syncprov-checkpoint 100 10 syncprov-sessionlog 100
# Let the replica DN have limitless searches limits dn.exact="cn=syncuser,dc=domain,dc=tld" time.soft=unlimited time.hard=unlimited size.soft=unlimited size.hard=unlimited --- master ----
--- slave (replica) ---- overlay syncprov
syncrepl rid=002 provider=ldaps://master.domain.tld:636/ binddn="cn=syncuser,dc=domain,dc=tld" bindmethod=simple credentials=clearTextPswd searchbase="dc=domain,dc=tld" # persistent connection type=refreshAndPersist retry="5 5 300 +"
# reference updates to master updateref ldaps://master.domain.tld:636 --- slave (replica) ----
Have a nice evening, Zdenek
openldap-technical@openldap.org