Author Topic: [SOLVED] migrating from 1.4 to 2.0  (Read 3237 times)

soscc

  • Zen Apprentice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
[SOLVED] migrating from 1.4 to 2.0
« on: June 03, 2011, 06:40:14 pm »
from reading the various posts there isn't an easy upgrade path from version e-box 1.4. to zentyal 2.0 so i'm not going to even attempt it. i can put a new hard disk in the machine and load version 2.0 on it with no problems. my biggest concern is migrating my e-mail from the old version to the new version. is there a handy guide for doing this, files to copy and their locations, etc.?
« Last Edit: September 01, 2011, 04:00:57 am by Sam Graf »

bbking

  • Zen Monk
  • **
  • Posts: 97
  • Karma: +2/-0
    • View Profile
Re: migrating from 1.4 to 2.0
« Reply #1 on: August 29, 2011, 10:46:30 am »
As I am just before this huge step from upgrading/changing from Ebox 1.4 to zentyal 2.x I'd repeat soscc's question and put in mine as well:
- first, I will attempt an upgrade from 1.4 to 2.x according to http://trac.zentyal.org/wiki/Documentation/Community/Updates?redirectedfrom=Document%2FDocumentation%2FUpdates and http://forum.zentyal.org/index.php/topic,4952.msg20402.html#msg20402 with one of the raid HDD's plugged off - just in case if something goes wrong I still can go back to my working set.
- if the upgrade is not possible, is there a way to export mails+users from Ebox and import them on a fresh install of Zentyal 2.x ?

I know this issue was discussed earlier before and I do understand that the upgrade is not an offically supported feature, but still, I'd love to hear some opinios whether there is a chance that I'll end up with a working 2.x or do I just waste my time?
Also, if the upgrade is not possible, what's the best way to get my users mails over to the new system? Will a full system backup from 1.4 offer me the chance to get the old data into 2.x?

Thanks a lot in advance!

christian

  • Guest
Re: migrating from 1.4 to 2.0
« Reply #2 on: August 29, 2011, 11:01:17 am »
So far there is no packaged upgrade path from 1.x to 2.x
I did upgrade both system and Ebox in the past with no major issue using apt (even running Ebox on non LTS) but if your system is in prod, I would suggest to stick on the only reliable approach (at least for what I understand) that is to reinstall 2.x from scratch and then import data once you have set up the new Zentyal platform.
I did it once with Zentyal acting as internet gateway (meaning few data aside mail). In order not to be impacted with incoming mails during migration, I changed settings on my external router so that port 25 on Postfix was not exposed to internet, then reinstalled Zentyal, configuration and then restored mail data that's it (for what I remember)  8)
Of course you have to configure Zentyal with same accounts. I have quite few so I did it manually.
In case you have significant amount of account, it might be interesting to export LDAP entries (users and groups) to LDIF and then import again.

@Zentyal team: has DIT changed between Ebox 1.x and Zentyal 2.x (which would prevent smooth LDIF export then import). What's about schema?

bbking

  • Zen Monk
  • **
  • Posts: 97
  • Karma: +2/-0
    • View Profile
Re: migrating from 1.4 to 2.0
« Reply #3 on: August 29, 2011, 11:34:28 am »
I only have about 5-6 users in the system right now, so manually adding them wouldn't kill me. But what I'm not quite sure of, where are all the emails stored? So how did you restore your mail data? Was it from the full system backup you made before the fresh install?


christian

  • Guest
Re: migrating from 1.4 to 2.0
« Reply #4 on: August 29, 2011, 11:54:59 am »
I did it easily for less than 15 accounts.
I don't know what you mean with "system backup". What I did is dedicated copy of "/var/mail" in which you will find, per virtual domain, mail folders per account.

bbking

  • Zen Monk
  • **
  • Posts: 97
  • Karma: +2/-0
    • View Profile
Re: migrating from 1.4 to 2.0
« Reply #5 on: August 29, 2011, 02:26:04 pm »
By system backup I mean the following (quoted from the 2nd link above):

Quote
First of all BACKUP your E-box configuration, I opened my ebox and went to Sytem menu, then Backup and created a FULL backup,

when I take a look at /var/mail I only see the mailboxes of the users who have a real account on Ebox, but not the "virtual users" ? AFAIK those must be in the postgres database...?

christian

  • Guest
Re: migrating from 1.4 to 2.0
« Reply #6 on: August 29, 2011, 03:06:31 pm »
I apologize in advance for my perhaps stupid question but what are "virtual users"?
To me, access to mailbox is made, assuming you are using standard mail service, using Dovecot that is looking at /var/mail/ and all accounts are defined in the "users" section, stored in LDAP.
Then if you mean "Zarafa", I can't help because I don't use it (exactly for this reason: mail is stored in a proprietary manner  :P). Since, aren't all accounts defined in LDAP too? meaning accounts are not virtual  ;)

Is there anything I don't understand?

bbking

  • Zen Monk
  • **
  • Posts: 97
  • Karma: +2/-0
    • View Profile
Re: migrating from 1.4 to 2.0
« Reply #7 on: August 29, 2011, 03:12:52 pm »
maybe I wasn't exact enough. By the term "virtual users" in Ebox 1.4 I mean the users who have a mailbox, can access samba shares and their mails by pop/imap/whatever - but don't have a shell access. I believe this was changed in Zentyal 2.x and all users have a shell *fixme*
Right now, in Ebox 1.4 I only see 3 accounts under /var/mail -> one of them is the admin account, other two were created by me for cvs and nagios -> the other 5-6 users are stored in the LDAP database -> so my original question was, how can I have a backup of those accounts?

sorry for confusion!

christian

  • Guest
Re: migrating from 1.4 to 2.0
« Reply #8 on: August 29, 2011, 03:19:29 pm »
Maybe I'm the one wrong here with mail directory location...  :o
I'll check twice later today and let you know.

Clearer now what you meant with virtual  ;)

bbking

  • Zen Monk
  • **
  • Posts: 97
  • Karma: +2/-0
    • View Profile
Re: migrating from 1.4 to 2.0
« Reply #9 on: August 30, 2011, 08:07:07 am »
In the meantime I did a full system backup (under the System menu -> Backup), but its only 1.4GB - my inbox allone is uncompressed 1.9GB so I doubt, the backup contains the mailbox data, too.

christian

  • Guest
Re: migrating from 1.4 to 2.0
« Reply #10 on: August 30, 2011, 09:45:13 pm »
when I take a look at /var/mail I only see the mailboxes of the users who have a real account on Ebox, but not the "virtual users" ? AFAIK those must be in the postgres database...?

At least something wrong in my point.
Mails are not stored in /var/mail/domain but in /var/vmail/domain.

Regarding mailbox size and full system backup: are you sure all mail clients are configured using IMAP and do not copy/move mails in local folder?
Also, using POP3 configure not keep mails server side will have similar effect.

bbking

  • Zen Monk
  • **
  • Posts: 97
  • Karma: +2/-0
    • View Profile
Re: migrating from 1.4 to 2.0
« Reply #11 on: August 31, 2011, 12:59:21 am »
Thanks a lot, /var/vmail is the winner!

Yes, the users are using IMAP.

In the meantime I have Zentyal 2 running on a separate machine. What should I do next? Create the same users on the new system and copy the contents of /var/vmail to the new machine? I'd like to use Zarafa, is there something special to mind?

Edit: I just copied one mailbox from ebox 1.4 to zentyal 2.0 exactly - but the mails don't show up in the web interface. How can I make them appear there?

Thanks
BBking
« Last Edit: August 31, 2011, 02:32:15 am by bbking »

christian

  • Guest
Re: migrating from 1.4 to 2.0
« Reply #12 on: August 31, 2011, 06:49:56 am »
Zarafa.... I can't help  :-[

Regarding mailbox migration, I would suggest you compare ebox account on both source and target machines (something like "cat /etc/passwd | grep ebox", look at UID and GID). It may require some alignment

bbking

  • Zen Monk
  • **
  • Posts: 97
  • Karma: +2/-0
    • View Profile
Re: migrating from 1.4 to 2.0
« Reply #13 on: August 31, 2011, 08:57:19 am »
Ok, thanks. At least, I have the transferred mails working with roundcube. Now the mails are visible in the webmail interface. One have to pay attention to the file permissions (like dovecot* files need only -rw------- permissions!) - this was the final piece in that puzzle.

How I can make the mails show up in the zarafa webaccess interface is the next question... :)

Somebody? :)

Thanks a lot!

BBKing

christian

  • Guest
Re: migrating from 1.4 to 2.0
« Reply #14 on: August 31, 2011, 09:16:43 am »
How I can make the mails show up in the zarafa webaccess interface is the next question... :)
Somebody? :)

Not me  ;D

I suppose, unless some tools are provided by Zarafa, that one have to use IMAP to IMAP transfer tool.
The point is that you will not be to easily start 2 IMAP listeners on same server using standard ports. The easiest could be to have customized Dovecot running on another port.  ::)