ISPConfig Migration and Upgrade

Discussion in 'Installation/Configuration' started by guimnk, Apr 6, 2010.

  1. guimnk

    guimnk Member

    Hi all..

    I've 2 questions, please, help-me. I have 2 servers running ISPConfig 3.0.16.

    Server A: Ubuntu 9.04 32bits
    Server B: Ubuntu 9.10 64bits

    1) How can I do to migrate ISPConfig from Server A to Server B?

    2) How can I do to upgrade ISPConfig from version to

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The migration steps are:

    1) Install the same ispconfig version on the second server.
    2) move all lines for the web* and client* users and groups from /etc/passwd and /etc/shadow and /etc/group and /etc/gshadow to the same files on the new server. Copy just these lines and not the whole files!
    3) Copy the /var/www and /var/vmail directories to the new server. Make sure that you preserve permissions by e.g. using these tar commands:

    tar pcfz www.tar.gz /var/www

    tar pcfz vmail.tar.gz /var/vmail

    4) Move the ispconfig mysql database to the new server and also move all client databases to the new server.

    To your second question: To update ispconfig, run the commands:

    as root user on the shell.
  3. guimnk

    guimnk Member

    Thank you Till..

    Is very important run this command after the importation of 'information_schema' of old mysql server in new mysql server..

    mysql_upgrade -u root -h localhost -p –v –f
    Before this command, I get amavisd errors.. Now, is fixed..

    Hmm.. I get errors with ISPConfig user in mysql.. Then, I copy the password generated in /etc/mydns.conf and replace the mysql password of ispconfig user.. The error is fixed..

    Till, How can I do to enable HA in ISPConfig3 ?
  4. Naudski

    Naudski New Member

    Hai Till,

    How about migrating the symbolic links in the /var/www/ dir?
    The tar pcfz command doesn't preserve the symbolic links or am I doing something wrong here?

  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The command tar pcfz preserves the links.
  6. guimnk

    guimnk Member

    Follow just till said, then you'll be able to migrate...


    To migrate using rsync:

    rsync -avu /var/www [email protected]:/var/
    rsync -avu /var/vmail [email protected]:/var/
    # = target server
    To migrate MySQL, use this script:

    # where your mysql commands are
    # login credentials of the submitting side
    # login credentials of the receiving side
    DB_HOST_TO="" # IP of target server...
    # index all databases on the local (submitting) side
    echo "database sync"
    # loop over all the databases
    for DATABASE in $DATABASES; do
      # skip non-databases
      if [ "${DATABASE}" != "Database" ] && [ "${DATABASE}" != "information_schema" ]; then
        echo "transmitting ${DATABASE}"
        # create database on remote (receiving) side if it doesn't exist
        # dump the current database and pipe it directly to the remote (receiving) side to inject it
        ${CMD_MYSQLDUMP} -Q -B --create-options --delayed-insert --complete-insert --quote-names --add-drop-table -p${DB_PASS_FROM} -u${DB_USER_FROM} -h${DB_HOST_FROM} ${DATABASE} | ${CMD_MYSQL} -p${DB_PASS_TO} -u ${DB_USER_TO} -h ${DB_HOST_TO} ${DATABASE}
  7. Lukash

    Lukash New Member

    Hello All,

    I have single server Debian 5.0 with BIND & Dovecot and ISPConfig 3 updated with all Debian security updates and with ISPConfig version Now I have a plan to migrate it to Web, Email And MySQL Database Cluster (Mirror) with BIND & Courier on Debian 6.0. Regarding mentioned case I have few questions:
    1) is this operation possible?
    2) may I use follwing tutorials for this operation ?
    3) do you have a different (better) ideas for mirrored ISPConfig servers?
    Thank you in advance for support.

  8. guimnk

    guimnk Member

    Hi Lukash!

    1) Yes, it's possible.
    2) You want to migrate and use this new server as a production server or you want to use this new server for backups (mirror)?
    3) If you want to migrate and use this new server as a production server, you want to follow the ideas in this post. If you want to synchronize your data in new server, you have other ways to do... Ex: using rsync with cron job, using mysql backup with cron job, and more..
  9. Lukash

    Lukash New Member

    Hi guimnk,

    Thanx for fast answer.
    1) Good information.
    2) I have 2 completly new servers with Debian 6.0.4 (base system + ssh only) installed. I want to install this servers as mirrored ISPConfig servers with mentioned tutorial. Afterwards migrate single server (settings, websites, emails, dns, etc.) to this two mirrored servers. After migration single server will be turned off. Do you have any advices for this operation?


Share This Page