Perfect migrating procedure

Discussion in 'Installation/Configuration' started by diablo666, Nov 29, 2013.

  1. diablo666

    diablo666 Active Member HowtoForge Supporter

    Hi there,
    i've searched all the forum but haven't found a perfect procedure to migrate one server to another.

    So i want to migrate one server running ispconfig 3.0.5.3 with debian 7 to a new server with debian 7.

    So what is the correct procedure?

    Please be as accurate as possibile.

    Thank you!
     
  2. sjau

    sjau Local Meanie Moderator

    do you have physical access to both servers?
     
  3. diablo666

    diablo666 Active Member HowtoForge Supporter

    Hi,
    both are in remote Datacenters
     
  4. sjau

    sjau Local Meanie Moderator

    why the change? get better machines? bigger disks?

    I was just thinking of ways to clone the disks or move the disks from one server to another :)
     
  5. diablo666

    diablo666 Active Member HowtoForge Supporter

    I'm moving from Phisical Server, to VPS in Cloud
     
  6. sjau

    sjau Local Meanie Moderator

    ah.... :) well, good luck :) can't really help you.
     
  7. diablo666

    diablo666 Active Member HowtoForge Supporter

    Thank you! ;D
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    I do migrations this way when the distribution is the same:

    Prerequiste: the second server uses the same linux distribution then the old one, the setup has to be installed as described in the perfect setup guide, but ispconfig shall not be installed yet.

    1) Copy the web* users + ssh users of the websites and the users getmail, vmail, ispconfig and client* groups + vmail, getmail and ispconfig from /etc/passwd, /etc/shadow /etc/gshadow and /etc/group from old to new server. just copy the lines that match the above criteria, dont copy the whole files!

    2) get the ispconfig database password from config.inc.php file of the old server and note it down, we need it later. Ensure that the mysql root password is the same on the new server.

    3) Install ispconfig on the new server, choose expert mode. In expert mode, the installer aks you for the password of the ispconfig mysql user. Use the password that you noted down in (2).

    4) Stop mysql on the new server. then run:

    mv /var/lib/mysql /var/lib/mysql_bak

    now copy the mysql directory of the old server to /var/lib/ on the new server. Then copy the /etc/mysql/debian.cnf file from old to new server. Now start mysql on the new server again.

    5) Copy /var/www, /var/log/ispconfig/httpd and /var/vmail from old to new server (e.g. with rsync). Ensure that you keep the file system permissions and ownerships.

    6) Login to ispconfig, go to tools > resync. check all checkboxes and start the rsync. The resnc will write missing config files (e.g. for the vhosts, quota values, bin files etc. to disk again).

    7) You're done :) Test your newly migrated setup before you go live.
     
    Last edited: Dec 2, 2013
    Turbanator and jeffsss like this.
  9. sjau

    sjau Local Meanie Moderator

    that sounds almost too easy....
     
  10. diablo666

    diablo666 Active Member HowtoForge Supporter

    I'm trying right now...

    For the db instead of brutaly copy, may a use a dump of all the DB on old server?
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    you can use mysqldump as well. It wll just take longer.
     
  12. diablo666

    diablo666 Active Member HowtoForge Supporter

    Procedure worked perfectly, thank you very much!
     
  13. diablo666

    diablo666 Active Member HowtoForge Supporter

    Problem...

    I've tried to disable clamv and amavis to free some resources, i'll migrate mail on a second server.

    I've done what written in this post http://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-disable-spamfilter-and-antivirus-functions-in-ispconfig-3/.

    The forwarding mail, works fine, but the mail account residing on server give this error:

    Code:
    Dec  8 17:47:37 ns1 postfix/pipe[12522]: 09F05C51D: to=<[email protected]>, relay=dovecot, delay=3794, delays=3794/0.04/0/0.03, dsn=4.3.0, status=deferred (temporary failure. Command output: lda: Error: user [email protected]: Error reading configuration: Invalid settings: postmaster_address setting not given lda: Fatal: Internal error occurred. Refer to server log for more information. )
    
    What's the problem?
     
  14. diablo666

    diablo666 Active Member HowtoForge Supporter

    Ok i've tried to setup it back as in the origin, but problem presist. The errore may be related to the migration, not for disabiling amavis and clam...
     
  15. diablo666

    diablo666 Active Member HowtoForge Supporter

    Hum i've found the solution.

    Following this upgrade procedure i've found that the file /etc/dovecot/dovecot.conf was like this

    Code:
    ...
    protocol lda {
      mail_plugins = sieve quota
    }
    
    i found that you got to add 1 line, so it looks like this

    Code:
    protocol lda {
      mail_plugins = sieve quota
      [B][I]postmaster_address = [email protected][/I][/B]
    }
    
    Dunno if this problem is related to the upgrade or to install process of ispconfig, but that's the fix.
     
  16. diablo666

    diablo666 Active Member HowtoForge Supporter

    Hum.... the strange fact is that on another installation of ispconfig, i saw that this parameter was missing, but all was working fine...
     
  17. jeffsss

    jeffsss New Member

    hey I ran through this, but when I went to the resync tools option, there is only the resync dns records.
    i copied all the relevant files over.
    also, when i try to view one of the sites, i get my centos apache test page and not the actual site



     
  18. jeffsss

    jeffsss New Member

    seems i broke it, now i cannot get apache to start.
     

Share This Page