Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Zarafa 4ucs to Kopano 4ucs migration. My notes.

    Kopano Groupware Core
    univention
    2
    7
    2197
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Ray Ellison
      Ray Ellison last edited by fbartels

      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-104

      I 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}”;
      done

      Whilst 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}”;
      done

      It 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

      fbartels 1 Reply Last reply Reply Quote 0
      • fbartels
        fbartels Kopano @Ray Ellison last edited by

        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.

        Regards Felix

        Resources:
        https://kopano.com/blog/how-to-get-kopano/
        https://documentation.kopano.io/
        https://kb.kopano.io/

        Support overview:
        https://kopano.com/support/

        1 Reply Last reply Reply Quote 0
        • Ray Ellison
          Ray Ellison last edited by

          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

          1 Reply Last reply Reply Quote 0
          • Ray Ellison
            Ray Ellison last edited by fbartels

            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…

            1 Reply Last reply Reply Quote 0
            • Ray Ellison
              Ray Ellison last edited by fbartels

              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
              
              fbartels 1 Reply Last reply Reply Quote 0
              • fbartels
                fbartels Kopano @Ray Ellison last edited by

                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).

                Regards Felix

                Resources:
                https://kopano.com/blog/how-to-get-kopano/
                https://documentation.kopano.io/
                https://kb.kopano.io/

                Support overview:
                https://kopano.com/support/

                1 Reply Last reply Reply Quote 0
                • Ray Ellison
                  Ray Ellison last edited by

                  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

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post