Zarafa 4ucs to Kopano 4ucs migration. My notes.
-
Hi Folks
Having now completed a couple of migration I can advise that the migration script is mostly effective but needs maturing a little.
In my two cases there appears to be a bug with migration of the attachments.I used the instructions for migration locatedar
https://wiki.z-hub.io/display/K4U/Migrating+from+the+old+Zarafa+Univention+Apps+to+Kopano4UCS
And the script Felix sent me.I used the appcentre web console to remove the Zarafa apps and replace them with the Kopano apps.
Running the migration script was straightforward as was the safe mode reset.
However Attachments were not migrated at all it seemed.
I manually copied recursively /var/lib/zarafa/attachments/* to /var/lib/kopano/attachments/*
In my case this only allowed access to some of the old attachments, but not all.looking at the Kopano server logs, I discovered some attachments were throwing an error about reading the Gzipped files.
Same detail as in https://jira.kopano.io/browse/KC-104I used the code from KC-104 in a shell script to recompress all GZ files.
for i in $(find /var/lib/kopano/attachments -type f -name “*.gz”); do
gzip -d “$i” && gzip “${i%.gz}”;
doneWhilst this recovered a lot more attachments there were still some missing.
it turned out that in both my sites, there were some attachment files NOT gzipped at all. No idea why.
I just used the below code, again in another shell script to compress them.for i in $(find /var/lib/kopano/attachments -type f -name ! “*.gz”); do
gzip “${i%.gz}”;
doneIt would appear that the attachments migration script may need updating to better move the files, and check for these two errors.
Hope this is useful to others.Kind regards
Ray -
Hello
@Ray-Ellison said in Zarafa 4ucs to Kopano 4ucs migration. My notes.:
However Attachments were not migrated at all it seemed.
Could you check the logfile created in
/var/log/kopano
to give an indicator on what went wrong during attachment migration?@Ray-Ellison said in Zarafa 4ucs to Kopano 4ucs migration. My notes.:
it turned out that in both my sites, there were some attachment files NOT gzipped at all. No idea why.
That is actually an expected behaviour. Attachments that are already known to be compressed (think of pdf, word and jpg) will not be run through gzip and be stored as-is.
-
Thanks Felix,I will have a look at the log.
Not compressing files already compressed makes perfect sense now that you have explained it.
Ray -
Hi Again Felix,
in fact the end of the migrate log doesn’t show much at all about the attachments process.Module: zarafa-cfg Module: kopano-cfg + '[' false == false ']' + '[' -d false ']' + '[' -d /var/lib/kopano/client ']' + migratedir kopano/cfg/server/attachment_path /var/lib/kopano/attachments false + local registry=kopano/cfg/server/attachment_path + local directory=/var/lib/kopano/attachments + local olddir=false ++ ucr get kopano/cfg/server/attachment_path + '[' -z ']' + ucr set kopano/cfg/server/attachment_path=/var/lib/kopano/attachments Create kopano/cfg/server/attachment_path Module: kopano-cfg Module: zarafa-cfg + '[' false == false ']' + '[' -d false ']' + '[' -d /var/lib/kopano/attachments ']' + chown -R kopano:kopano /var/lib/kopano/attachments
and that was the end of the file…
-
Checked the server at thecorner.
Create kopano/cfg/server/client_update_path Module: zarafa-cfg Module: kopano-cfg + '[' false == false ']' + '[' -d false ']' + '[' -d /var/lib/kopano/client ']' + migratedir kopano/cfg/server/attachment_path /var/lib/kopano/attachments false + local registry=kopano/cfg/server/attachment_path + local directory=/var/lib/kopano/attachments + local olddir=false ++ ucr get kopano/cfg/server/attachment_path + '[' -z ']' + ucr set kopano/cfg/server/attachment_path=/var/lib/kopano/attachments Create kopano/cfg/server/attachment_path Module: kopano-cfg Module: zarafa-cfg + '[' false == false ']' + '[' -d false ']' + '[' -d /var/lib/kopano/attachments ']' + chown -R kopano:kopano /var/lib/kopano/attachments
-
Hello @Ray-Ellison
because of the
migratedir kopano/cfg/server/attachment_path /var/lib/kopano/attachments false
he indeed did not try to move over your attachments. Just moving and then chowning the files would have been the same, the migration script would have done. Not quite clear why he passed fakse to the function, could it be that you were using an older version? (e.g. not 8.1.1.10-8.1-2).
-
Thanks Felix.
ineed it was odd. I am pretty sure Id updated both Zarafa builds before the migrations but who knows. I guess I could have moved and Chowned. That wouldnt have fixed the errors showing same as noted in KC-104 though.
Anyway its all fixed now in both my servers.
Ray