Make a backup of:
/etc/group /etc/passwd /etc/shadow /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/postfix/local-host-names /etc/postfix/virtusertable /etc/proftpd*.conf
cd /var/lib/named/etc/bind
Backup BIND files if use DNS
named.conf all the pri.* zone files
Create 3 sql dumps: ALL your MySQL databases
mysqldump -p --all-databases > all_databases.sql mysqldump -p --databases mysql > mysql.sql mysqldump -p --databases db_ispconfig > ispconfigdb.sql
“mysqldump” does not dump the INFORMATION_SCHEMA database. If you name that database explicitly on the command line, mysqldump silently ignores it.
remember that the mysql & test databases are specials! You need to remove them from the all_databases.sql dump, before import in the new server
To show the databases on your mysql server run
mysqlshow -p
Create a Postfix transport, so that all emails are forwarded to the new server, until the MX records of your domains have switched to the new server, run:
echo "* smtp:[<FQDN or IP address, of new server>]" >> /etc/postfix/transport postmap /etc/postfix/transport postconf -e 'transport_maps = hash:/etc/postfix/transport'
Stop Postfix so that no new mails can arrive:
/etc/init.d/postfix stop
Backup /var/www on the old server
cd /var tar -pczf www.tar.gz www/
Remember that -p stands for keep permissions
Install ISPConfig, it MUST BE THE SAME VERSION OF THAT ON THE OLD SERVER
Regarding the mysql database: have a look at the users & db tables in the all_databases.sql dump file, then add the user & db rowsthat don't exist on the new server but on the old server.
So, completely remove the mysql database from the all_databases.sql file, then create all the databases running:
mysql -u root -p < all_databases.sql mysql -u root -p < mysql.sql
It is safe to replace the ISPConfig database with the old one
Log in to ISPConfig and go to
Management -> Server -> Settings
and change the IP address(es) there.
Copy local-host-names and virtusertable to /etc/postfix
Open local-host-names and replace the old hostname with the new one, add the hostname of the old server at the bottom so that the new server accepts the forwarded mails, then run
postmap /etc/postfix/virtusertable
Replace Vhosts_ispconfig.conf with the one from the old server. Open it and replace the old IP address with the new one, then restart apache
/etc/init.d/apache restart
Transfer www.tar.gz to /var and unpack it:
cd /var mv www www_orig tar xvfz www.tar.gz
Transfer proftp*.conf files, open them and replace the old IP address with the new one Restart proftpd
/etc/init.d/proftpd restart