How to move mail hosting with ISPConfig3 (dovecot, postfix, apache2, …) from CentOS 5 to CentOS 6
28-11-2012
(Here, CentOS 5.8 with ip 10.100.1.2 and CentOS 6.3 with 10.100.1.3)
CentOS-5.8 is installing ISPConfig-3.0.3.3 and we will update to ISPConfig-3.0.4.6 on CentOS-6.3
Step1: Backup mailbox and dbispconfig database on CentOS 5.8
Backup all mailbox of users, mail domain
#tar czvf /backup/mailbox.tar.gz /var/mail
Backup dbispconfig database
#mysqldump -u root -p dbispconfig >/backup/dbispconfig.sql
#Enter password: …. (password of root user)
Step 2: Installing new CentOS 6.3 and configuring services
Installing CentOS-6.3
Copy mailbox.tar.gz and dbispconfig.sql from 10.100.1.2 to 10.100.1.3
#scp /backup/mailbox.tar.gz root@10.100.1.3:/var/download
#scp /backup/dbispconfig.sql root@10.100.1.3:/var/download
Installing services(Apache2, dovecot, ..) the followinghttp://www.howtoforge.com/perfect-server-centos-6.3-x86_64-apache2-dovecot-ispconfig-3-p6 and finish at step 23 (Install Squirrelmail), have not install step 24 (Install ISPConfig3, because we will import database ispconfig.sql that compatible with ispconfig-3.0.3.3 ).
And then, download ISPConfig-3.0.3.3.tar.gz, extract and install it
#cd /var/download
#wgethttp://nchc.dl.sourceforge.net/project/ispconfig/ISPConfig%203/ISPConfig-3.0.3.3/ISPConfig-3.0.3.3.tar.gz
#tar zxvf ISPConfig-3.0.3.3.tar.gz
#cd ispconfig3_install/install
#php -q install.php
Step 3: Restore dbispconfig database and mailbox
Using phpmyadmin, drop all tables of dbispconfig databse and import the file dbispconfig.db to dbispconfig database
Or use:
#mysql –host=localhost –user=root –password=XXXXXX < /var/download/dbispconfig.sql
Restore mailbox of all mail users
#cd /
#tar zxvf /var/download/mailbox.tar.gz
Step 4: Update to ISPConfig-3.0.4.6
Download ISPConfig-3.0.4.6.tar.gz (the present, it is lastest and stable version)
#cd /var/dowload
#rm -rf ispconfig3_install
#wget http://prdownloads.sourceforge.net/ispconfig/ISPConfig-3.0.4.6.tar.gz
Executing update ISPConfig-3.0.3.3 to ISPConfig-3.0.4.6
#tar zxvf ISPConfig-3.0.4.6.tar.gz
#cd ispconfig3_install/install
#php -q update.php
Comments
Post a Comment