Move ISPConfig installation to another server

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:

  1. prepare the new server, make a new installation of the very same version of ISPConfig you have on the origin server;
  2. 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 to apt install on the destination;
  3. 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
  4. connect to the new server ispconfig panel and go to Tools > Resync, check the All services checkbox and press Start;
  5. rsync /var/www with:
    rsync -a --stats --progress --delete ORIGIN_SERVER:/var/www/* /var/www/
  6. rsync /var/vmail by adjusting the command above
  7. rsync /etc/letsencrypt
    rsync -a --stats --progress --delete ORIGIN_SERVER:/etc/letsencrypt/* /etc/letsencrypt/
  8. make a dump of all c* databases and restore them on the new server;
  9. if you want to retain the same ISPConfig panel certs copy /usr/local/ispconfig/interface/ssl/;
  10. move DNS and all related stuff to the new IP.

Everything should work on the new IP now!

Un pensiero su “Move ISPConfig installation to another server

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Solve : *
11 + 13 =


Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.