docs: data migration

Michael kolab983 at der-he.de
Tue Nov 12 17:22:54 CET 2013


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


More information about the users mailing list