We decided to migrate one of our Contabo SSD-cached VPS to a pure SSD one. That’s because SSD with mechanical disks were not suitable for our usage. They’re excellent for storage, but not really optimal for more interactive services like php websites.
So I’ve written a quick checklist of steps to do to clone an ISPConfig installation on a different server. In our case this also included the upgrade from Ubuntu 16.04 to 18.04.
Here’s the list:
- prepare the new server, make a new installation of the very same version of ISPConfig you have on the origin server;
- make sure you have the same php packages installed on the new server. You can generate a list on the origin server with
dpkg --get-selections | grep ^php | awk '{print $1}' | xargs
and paste the output toapt install
on the destination; - make a backup of the ispconfig database on origin. If you want you can change the IP (and eventually the hostname) with sed:
sed -i 's/1\.2\.3\.4/5\.6\.7\.8/g' db-dbispconfig-2019-05-25.sql
sed -i 's/old\.host\.name/new\.host\.name/g' db-dbispconfig-2019-05-25.sql
And restore it on the destination with:cat db-dbispconfig-2019-05-25.sql | mysql -u root -p dbispconfig
- connect to the new server ispconfig panel and go to Tools > Resync, check the All services checkbox and press Start;
- rsync /var/www with:
rsync -a --stats --progress --delete ORIGIN_SERVER:/var/www/* /var/www/
- rsync /var/vmail by adjusting the command above
- rsync /etc/letsencrypt
rsync -a --stats --progress --delete ORIGIN_SERVER:/etc/letsencrypt/* /etc/letsencrypt/
- make a dump of all c* databases and restore them on the new server;
- if you want to retain the same ISPConfig panel certs copy /usr/local/ispconfig/interface/ssl/;
- move DNS and all related stuff to the new IP.
Everything should work on the new IP now!
Worked like a charm ! Thank you so much.