1 (edited by kodb2105 2015-10-28 10:00:41)

Topic: questions about migration from 0.8.5 to 0.9.2 and new VM server

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.8.5
- Linux/BSD distribution name and version: ubuntu 12.04.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====
I have a few questions regarding migrating our old install from the 12.04 box to a 14.04 ubuntu vm on a high availability cluster which is now just installed at 0.9.2 iRedMail + SOGo.
1-I have read the migration tutorial and am unclear about dropping columns from the vmail database prior to "import".  I used the tools and the backup_mysql.sh to generate my backup dbs.  Do I use mysql commands or ubuntu cli to bring the db back into mysql?  And if so do I then follow the directions in the tutorial?
2-I setup the new vm server and installed clean with iRed 0.9.2.  My initial domain is the new domain we will be using in the office.  Do I need to add the old domain via iredadmin prior to following the steps outlined in the tutorial or will it show up automatically once I restore the databases and roundcube?
3-for the dkim keys:  do I copy over into the /var/lib/dkim directory and the old lives with the  new or do I have to add them somehow to the existing keys on the new server?
4- we run sogo alongside this.  Do I need to restore all the ired components prior to doing the sogo-tool restore?

Thanks- as always your help is appreciated.
Bob

----

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

2

Re: questions about migration from 0.8.5 to 0.9.2 and new VM server

kodb2105 wrote:

1-I have read the migration tutorial and am unclear about dropping columns from the vmail database prior to "import".  I used the tools and the backup_mysql.sh to generate my backup dbs.  Do I use mysql commands or ubuntu cli to bring the db back into mysql?  And if so do I then follow the directions in the tutorial?

To migrate an old iRedMail release, it's better to create a new database (e.g. `old_vmail`) on NEW server, then old database to `old_vmail`, then use MySQL command "INSERT INTO vmail (xx, xx, xx, ...) SELECT xx, xx, xx, ... FROM old_vmail WHERE ..." to export and import mail accounts.

kodb2105 wrote:

2-I setup the new vm server and installed clean with iRed 0.9.2.  My initial domain is the new domain we will be using in the office.  Do I need to add the old domain via iredadmin prior to following the steps outlined in the tutorial or will it show up automatically once I restore the databases and roundcube?

It will show up automatically, you don't need to create them with iRedAdmin.

kodb2105 wrote:

3-for the dkim keys:  do I copy over into the /var/lib/dkim directory and the old lives with the  new or do I have to add them somehow to the existing keys on the new server?

It's ok to copy DKIM keys from old server.

kodb2105 wrote:

4- we run sogo alongside this.  Do I need to restore all the ired components prior to doing the sogo-tool restore?

No.

3

Re: questions about migration from 0.8.5 to 0.9.2 and new VM server

Zhang,
Thank you very much for the detailed reply.  I will be attempting this during the upcoming weekend following your directions.
Appreciate the help as always
Bob

4

Re: questions about migration from 0.8.5 to 0.9.2 and new VM server

ok, I have brought the old vmail db to the new server and renamed according to the above.
Further questions:
1)Are the insert and drop column commands in the migration tutorial necessary for going from 0.8.5->0.9.2?

2)If so, I assume I do them on old_vmail and then use the select and insert commands to bring in the accounts, yes?

3)If I desire to simply import the entire old schema do I use wilcards or is there a global command I should be  using to import in the entire old db?

Thanks again
Bob

5

Re: questions about migration from 0.8.5 to 0.9.2 and new VM server

kodb2105 wrote:

1)Are the insert and drop column commands in the migration tutorial necessary for going from 0.8.5->0.9.2?

I suggest you follow our upgrade tutorials from 0.8.5 -> 0.8.6 -> ... -> 0.9.2, just apply SQL structure changes, then you get the same sql structure as 0.9.2, and ok to import it directly.