migrating zarafa to a new kopano server

I have the below

Centos 6 64 bit OS as a mail server with zarafa

Zarafa version: 7,1,2,39121

Now I had installed it using z-admin and I am using the internal open-ldap server for user authentication.
Initial server configuration and user administration is done with yaffas zadmin

Now I have a separate server where I have installed kopano core , webapp and also z push using the below link… https://kb.kopano.io/display/WIKI/Core#Core-Userbackendand is working fine. so i am using the database backened

the versions are as below

WebApp: -----------3.4.20.1651-940.1
Kopano Core: -------8.6.80.1350
Z-Push:-------------2.4.4+0

I need to move the users and the emails to the new kopano server.
after this would also move the mobile data but guess that’s not critical.

as per my plan

  1. backup mysql data and restore on the new kopano server

  2. copy the ldap from curent zarafa server that is /var/lib/ldap to new kopano server

  3. copy the attachment directory of my current zarafa server to the new kopano server

will the above work …
also appreciate if you could let me know the required changes to be done if necessary or some link that can assist me to move to my new kopano server

Thanks and regards.
really would apprecite your kind help

simon

dear all,

I have backup my mysql database and imported it on my new kopano server sucessfully
also have moved the attachment
but i am stuck on migrating my users …
really appreciate if someone could guide me as to how i could move my users to my new kopano server since I am a novice in Ldap

thanks and regards

simon

Hi Simon,
did you check this here out? This is a very good manual.
https://documentation.kopano.io/kopano_migration_manual/zcp_migration.html
What exactly is your problem with migrating the users?
My biggest problem while migrating was to move the users from the old to the new LDAP Server. You can find it here:
https://forum.kopano.io/topic/442/ldap-migration-zarafa-kopano-not-working/7
-> check out my latest post :)
Good luck
best regards
Andreas

Dear Andreas ,

Thanks a lot for the quick reply
I will check it out and let you know

Just for test I did create a new user using the kopano cli command and kopano configured to use db pluggin and I was succesfully able to login into webapp

since I have abt 200 email users on my old working zarafa server i need to login into webapp with the existing users

the first link I believe is migration of zarafa to kopano on the same server
but for me i want to move the users to the new server so my existing users can log into webapp and see their mail
aslo my old zarafa server was installed using yum and configured via yaffas zadmin web tool.

regards

simon

Hi Simon,

I used http://phpldapadmin.sourceforge.net/wiki/index.php/Main_Page to verify my users on the new system.
I’m no sure if the kopano CLI uses the openldap server to store the users.

I recommend to first transfer all users to the new openldap Server and verify if they all exist.
If yes you can continue with the “zarafa to kopano” skript.
https://documentation.kopano.io/kopano_migration_manual/zcp_migration.html
Poiint 4.3.1
If you have a working openldap on the new server you can continue with the migration.
best regards
Andreas

Dear andreas,

Thanks a lot for the quick reply.
i will check as per your suggestion and let you know.
btw I had checked before your links but not able to see the users
i have installed phpldapadmin but not able to log in cause i was stuck with the default username and password
i will try to freshly move the users to the new servers and check it out

regards

simon

Hello Simon.

I think you want to migrate Zarafa with LDAP User to Kopano with local DB User.
Is that correct?

If you have local DB User, there is no need for a LDAP Admin Tool, as you simply have no local LDAP Server.
The users are stored in the database.

So you have a new Kopano Server and imported the mysql database and copied the attachments.
You also have create a local user with kopano-cli Tool.

The easiest way to get your e-mail is to attach the old store with the new user.
Take a look at following commands:
List all orphaned mailboxes:
“kopano-cli --list-orphans”

Now hook the store with the new local user:
“kopano-cli --hook-store=<STORE-ID> -u <USER>”

You can now login with the user and should see all emails again.

How many users do you have on the old Zarafa Server?

Hope this helps.

Kind regards
Basti

Dear Basti,

Really appreciate your reply but so sorry for my delay as i was out of office
I have imported the mysql database in my new kopano server and also copied the attachments
the import onto the new kopano server has gone through without any error
i have copied the attachments too

but when i use the command i see no stores

[root@kopano ~]# kopano-cli --list-orphans
Stores without users:
Store guid Username Last login Store size Store type
----------------------------------------------------------------------------------------------------
Users without stores (0):
User Full Name Homeserver Store

[root@kopano ~]#

on my new kopano server i had just created 3 users for test before i did import my mysql databse into new kopano server and those are the users I see as below


[root@kopano ~]# kopano-cli --list-users
User list for Default (4):
User Full Name Homeserver Store

      SYSTEM              SYSTEM             Unknown        8962FFEFFB7B4D639BC5967C4BB58234
         ben     Benedict Dcunha             Unknown        EAE7EB21BB8C46689076EC44D8FF8C24
    h.alazmi         husain azmi             Unknown        12190720774C44FF8FE5E623B46966F0
        john                                 Unknown        B7516449E02D4E12BA14C5107A154EFD

the above 3 users can log in successfully with no issues.

i really would apprecite your help and advice

regards

simon

Dear Basti,

I did the below
after I had imported the mysql database from my running zarafa server onto my new kopano server i could not see any users or orphned stores as per my above post

but after little homework i changed my server.cfg to tell kopano server to use the new database which was named as zarafa
i could even see all my uses when i used to list them in mysql
but the kopano server refused to start showing the below message


Sep 16 13:10:06 kopano kopano-server[1366]: K-1216: Cannot update to schema v69, because the “names” table contains unexpected rows. Certain prior versions of the server erroneously allowed these duplicates to be added (KC-1108).
Sep 16 13:10:06 kopano kopano-server[1366]: K-1220: To fix the excess rows, use kopano-dbadm k-1216. Consult the manpage and preferably make a backup first.
Sep 16 13:10:06 kopano kopano-server[1366]: K-1221: Alternatively, the server may be started with --ignore-da to forego the schema update.
Sep 16 13:10:06 kopano kopano-server[1366]: WARNING: Unable to upgrade database from version 8.6.80.1350.68 to 8.6.80.1350.70
Sep 16 13:10:06 kopano kopano-server[1366]: You can force the server to start with --ignore-database-version-conflict
Sep 16 13:10:06 kopano kopano-server[1366]: Warning, you can lose data! If you don’t know what you’re doing, you shouldn’t be using this option!
Sep 16 13:10:06 kopano kopano-server[1366]: An error occurred: version mismatch (0x80000021). Please check logfile syslog:- for details.
Sep 16 13:10:06 kopano systemd[1]: kopano-server.service: main process exited, code=exited, status=255/n/a
Sep 16 13:10:06 kopano systemd[1]: Unit kopano-server.service entered failed state.
Sep 16 13:10:06 kopano systemd[1]: kopano-server.service failed.


appreciate if i can get some advise and help

regards

simon

As you see in log: To fix the excess rows, use kopano-dbadm k-1216.
You need to run:

kopano-dbadm k-1216

to fix this.

Deat walter,

Thanks for you reply
just today morning i did run kopano-dbadm k-1216 and it took almost more than 2 hrs for the the task to be finished and now kopano-cli --list-orphans shows me the stores as shown below


[root@kopano ~]# kopano-cli --list-orphans | more
Stores without users:
Store guid Username Last login Store size Store type
----------------------------------------------------------------------------------------------------
F710A620FA5B45B297B34EA5571DD466 <unknown> 0.00 MB private
DAFD29AD90A8453CA2851AD2C1F4A41E <unknown> 0.00 MB private
29AB0994BB0942C591093A276D200A42 <unknown> 2.30 MB private
A55AEE3829794A9CAAD11C2B57347F3A <unknown> 0.00 MB private
939E4BD2F9A64BC292F3026230B3C8EA <unknown> 2.15 MB private
E076E54BB4C04AA18ADA38C4392D88F5 <unknown> 0.01 MB private
10ABD12078DB4D2CB68F4A9B79DD636A <unknown> 1621.28 MB private
D25E9785AACA4A339AB322FAD9EA2FFA <unknown> 0.05 MB private
5D9B0901B2CB4D508F76EBEEE49BF402 <unknown> 0.00 MB private
9DED40C320044DB4B54AFF7E988B5DCC <unknown> 0.00 MB private
4672867CD7FE4E308EF23F585E568CD7 <unknown> 0.00 MB private
BBF41AB1B9114D0EB91AF126DDB77D34 <unknown> 0.41 MB private
9722C65760204D1CA23D25CC0F27FF59 <unknown> 0.00 MB private
7B99C0F009374B918F68A934DD2BB203 <unknown> 0.00 MB private
69355C3763AF4A58B25C225B3CAB0224 <unknown> 6.40 MB private
458000F5912C4D4F81B4AFE6CD6BCF29 <unknown> 6.41 MB private
AEAF9BDC1F3F408AACB737488ECF91FF <unknown> 0.00 MB private
BABA8FF5301A4C5C98E4F02B41E0C0E9 <unknown> 0.00 MB private
F530D8E071D44348A30978A263996D3E <unknown> 0.00 MB private


since the username field is blank i dont the which store belongs to which user so as to hook it
have about 400 users

appreciate your help and advice

thanks and regards

simon

Hello Simon.

Wow you have created 400 users on the command line?
That have must been a long work day.

First i would delete the 0MB stores with the following command:

for i in $(kopano-cli --list-orphans |grep "0.00 MB" | awk '{print $1}'); do kopano-cli --remove-store $i; done

After that i would hook the store to a dummy user, just to see which content is in the store.
When you know to which person the store belongs, you can hook it to the right user.

But thats a lot of work for 400 users.

Maybe the Kopano Staff knows a more appropriate and faster solution.

Kind regards
Basti

Hi @sbdcunha ,

just a thought from my side

@sbdcunha said in migrating zarafa to a new kopano server:

have about 400 users

would you be willing to get professional help? so someone who would properly migrate your ldap tree so you can just reuse your users and don’t need to rehook/recreate every user? such a person could then also help you with the rest of the migration and ensure proper performance on your new machine.

Some of the replies in this thread came Kopano partners who would probably help you out with your challenge. Or you could get in contact with our professional services directly (via our support).

Dear Guys ,

appreciate your quick response .
dear basti i have not created the users but my old zarafa has about 400 users.
would also weigh the option to have to probably contact support for profesional services as mr felix says

thanks guys once again

regards

simon