1 (edited by Sybari 2010-12-06 08:12:52)

Topic: Trying to migrate from one iRedMail server to another

After having issues with the server that my iRedMail installation is hosted on, I've migrated everything to a new host.  When attempting to login using any use, dovecot connections fail, and the following is littered in the dovecot log:

Error: auth-worker(default): sql(brad@email.com,127.0.0.1): User query failed                                                      : Unknown column 'storagenode' in 'field list'

Now, the old server is 0.6.0 and on the new server I've installed 0.6.1.  I'm assuming storagenode is a new column in the authentication table for 6.1, but what are the default values and where is this found?  I took a look at the upgrade from 6.0 to 6.1, but didn't find much help.

Anybody seen this before?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Trying to migrate from one iRedMail server to another

How did you migrate iRedMail?
For user account migration, you can simply setup new iRedMail server, import SQL database "vmail" from old server.

Because new installation already has necessary SQL users in table "mysql.user", so, to make things easy, you can just import mail users without software configurations, except your custom settings.

3

Re: Trying to migrate from one iRedMail server to another

That's exactly what I did.  I imported the vmail database from the old server, and this is where I got.

4

Re: Trying to migrate from one iRedMail server to another

For user@domain.ltd, it's default maildir is /var/vmail/vmail1/domain.ltd/u/s/e/user-20101206122222/.

Value of SQL column 'storagebasedirectory' should be same as value of postfix "virtual_mailbox_base" setting, it's '/var/vmail'.
Column 'storagenode' should be 'vmail1'.

Seems you don't have column 'storagenode ' in your sql server, please add it first, and then change its value.

If you're not sure which value you should use, paste the sql record of existing user here here:

mysql> SELECT * FROM vmail.mailbox WHERE username='user@example.com';

5

Re: Trying to migrate from one iRedMail server to another

Looks like that's the issue.  Any quick SQL command I can run that would add this to all records or do I need to do this one by one?


*************************** 1. row ***************************
                username: brad@email.com
                password:
                    name: Brad
    storagebasedirectory: /var/vmail/vmail01
                 maildir: email.com/brad/
                   quota: 100
                  domain: email.com
               transport: dovecot

6

Re: Trying to migrate from one iRedMail server to another

Warning: BACKUP YOUR DATABASES BEFORE PERFORM BELOW STEPS.

You can:
- update 'storagebasedirectory' to '/var/vmail'
- add column 'storagenode' (Reference: http://iredmail.googlecode.com/hg/iRedM … dmail.sql)
- Set value of 'storagenode' to 'vmail01'

That's all.