docs: data migration

Mike Brady mike.brady at devnull.net.nz
Tue Nov 12 20:50:09 CET 2013


Quoting Michael <kolab983 at der-he.de>:

> http://docs.kolab.org/administrator-guide/upgrading-from-kolab-2.3.html#migration-of-ldap
>
> ###1###
>
> 11. Upgrade all messages from Kolab Format:
>
>  sed -e 's/user///g'
>
> Does this work anywhere? I had to change this to "sed -e 's#user/##g'"
>
> ###2###
>
> The conversion script by Jeroen van Meeuwen doesn't convert internal  
> kolab 2 users created via the old webadmin. Btw. because most of the  
> links are dead nowadays, I copy the script here (I used it only to  
> crib parts of it):
>
>
> #!/bin/bash
>
> kolab2host="kolab2.example.org"
> bind2dn="cn=manager,cn=internal,dc=example,dc=org"
> bind2pw="somepassword"
>
> kolab3host="192.168.122.13"
> bind3dn="cn=Directory Manager"
> bind3pw="somepassword"
>
> resetpw="somepassword"
>
> ldap_opts="-x -h ${kolab2host} -D '${bind2dn}' -w '${bind2pw}' -b  
> dc=example,dc=org -s one"
> ldap_sopts="${ldap_opts} -LLL (objectclass=kolabinetorgperson)"
>
> ldapsearch ${ldap_sopts} | \
>     sed \
>         -r \
>         -e 's/uid=(.*)@example\.org,/uid=\1,/g' \
>         -e  
> 's/uid=([^,]*),dc=example,dc=org/uid=\1,ou=People,dc=example,dc=org/g'  
> \
>         -e 's/^uid: (.*)@example\.org/uid: \1/g' \
>         -e '/^kolabHomeServer:/d' \
>         -e '/^cyrus-userquota:/d' \
>         -e '/^kolabFreeBusyFuture:/d' \
>         -e '/^c:/d' \
>         -e "s/^userPassword.*/userPassword: ${resetpw}/g" | \
>             ldapadd -x -h ${kolab3host} -D "${bind3dn}" -w "${bind3pw}"
>             -c
> _______________________________________________
> users mailing list
> users at lists.kolab.org
> https://lists.kolab.org/mailman/listinfo/users
>

I have been working my way through a migration from 2.3.4 over the  
last few days and have found all the issues that Michael has been  
raising.  I was going to email the list today with them but he beat me  
to it :-)

For the above script I added the line

-e  
's/cn=([^,]*),dc=devnull,dc=net,dc=nz/uid=\1,ou=People,dc=devnull,dc=net,dc=nz/g'  
\

into the sed to convirt the 2.3 dn to the 3.1 style.  This has worked  
for me on pmy personal server which only has a couple of users.  Not  
sure if this would cause issues going forward though with the uid  
policies.

I now have an issue with there being no Calandars, but I will send a  
separate email on that shortly.

Regards

Mike



More information about the users mailing list