Clone ISPConfig installation

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. copy users and group. Just run the commands below and paste the output in the respective file on the new server:
    cat /etc/passwd | grep ^web
    cat /etc/shadow | grep ^web
    cat /etc/group | grep ^client
  4. make a backup of the ispconfig database on origin, and restore it on the destination with:
    cat db-dbispconfig-2019-05-25.sql | mysql -u root -p dbispconfig
  5. connect to the new server ispconfig panel and go to Tools > Resync, check the All services checkbox and press Start;
  6. rsync /var/www with:
    rsync --dry-run -a --stats --progress --delete ORIGIN_SERVER:/var/www/* /var/www/
  7. rsync /var/vmail
  8. cat /etc/passwd | grep ^webprepare the new server, make a new installation of the very same version of ISPConfig you have on the origin server;
  9. 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;
  10. copy users and group. Just run the commands below and paste the output in the respective file on the new server:
    cat /etc/passwd | grep ^web
    cat /etc/shadow | grep ^web
    cat /etc/group | grep ^client
  11. make a backup of the ispconfig database on origin, and restore it on the destination with:
    cat db-dbispconfig-2019-05-25.sql | mysql -u root -p dbispconfig
    In the ISPConfig panel go to System > Server IP Address and adjust with the new IPs;
  12. connect to the new server ispconfig panel and go to Tools > Resync, check all the checkboxes and press Start;
  13. rsync /var/www
    rsync -e "ssh -p30022" -a --stats --progress --delete ORIGIN_SERVER:/var/www/* /var/www/
  14. rsync /var/vmail
    rsync -e "ssh -p30022" -a --stats --progress --delete ORIGIN_SERVER:/var/vmail/* /var/vmail/
  15. rsync /etc/letsencrypt
    rsync -e "ssh -p30022" -a --stats --progress --delete ORIGIN_SERVER:/etc/letsencrypt/* /etc/letsencrypt/
  16. make a dump of all c* databases and restore them on the new server;
  17. if you want to retain the same ISPConfig panel certs copy /usr/local/ispconfig/interface/ssl/;
  18. move DNS and all related stuff to the new IP.

Everything should work on the new IP now!

Lascia un commento

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

Solve : *
26 − 22 =


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