Migrate single Lenny to Multi Lenny+Squeeze

Discussion in 'ISPConfig 3 Priority Support' started by Turbanator, Jul 20, 2013.

  1. Turbanator

    Turbanator HowtoForge Supporter

    Current setup:
    1 single Perfect Lenny x64, mydns, courier ISPC3 latest.

    Goal:
    Multi server with
    Same existing Lenny but migrate Mail to 2nd Squeeze server and use as Secondary DNS leaving all other services still on Lenny.

    Any recommendations or things to watch for?

    My thoughts:
    1. Setup squeeze server following Perfect with Bind and courier, ISCP3 latest.
    2. setup Lenny and Squeeze servers config based on the Multi Server setup for Squeeze HowTo but only for the Mail part and Secondary dns.
    3. How do I get the mail from the old Lenny migrated to the new Squeeze...simple rsync or tar /var/vmail and copy?
    4. anything I'm not thinking about?

    Lenny currently has 10 different domains on it and I'd like Squeeze server to handle all mail for all domains.

    Any help would be greatly appreciated.

    btw, I'm doing it this way because I chickened out on doing a dist-upgrade from Lenny w/RAID to Squeeze over SSH remotely.
    Thank you.
     
    Last edited: Jul 20, 2013
  2. Turbanator

    Turbanator HowtoForge Supporter

    Here is where I'm at..with questions as well.

    Server 1 ISPC3 confgi'd as multiserver with Email turned off in control panel.
    Server 2 config'd as multiserver with Email turned ON in sever 1 control panl.

    currently rsync'ing all /var/vmail from server 1 to server 2.

    Open router to allow all email ports to new Server 2 which has public ip.

    Questions:
    1. - Do I need to use iscp3 resync tool to resync any services?

    2. - For my domains which all had email on server 1, do I need to change all dns MX and A (mail) records to point to new the Server 2 public ip instead of the Server 1 ip...or does ISPC3 handle all that? (currently domains are pointed at server 1 public ip).

    I did a test on 1 domain for ques 2 above, and now I get login failed errors for that domain on emails. ....so I'm sort of lost now.

    I would also like Server 2 to be a Secondary dns... not sure what I need to do to make that happen...or maybe I alrady did that...but it's bind whereas Server 1 is mydns.

    Please help.
     
  3. Turbanator

    Turbanator HowtoForge Supporter

    so I got email working by doing the rsync of /var/vmail and then ran the Tools->Resync on emails and dns. I'm still ASSUMING that secondary dns is working...i'll worry about that part later.

    Now that I have a working email server on Server 2, I decided that I also want Server 2 to be a 2nd Web server.

    Question:
    Would I break Server 2 if I rerun
    > php -q install.php
    ??

    If I do it, should I tell it to Configure Mail again, or tell it No since it's already running?
     
  4. till

    till Super Moderator

    Yes, that will break the server.

    But you can do the following steps:

    1) install the missing os packages for the web server.
    2) enable webserver,fileserver and db server under system > server services
    3) run the update.php script which is in the install folderof the ispconfig tar.gz and choose to reconfigure services.
     
  5. Turbanator

    Turbanator HowtoForge Supporter

    Thank you Till.

    Since my server 2 is the Mail server and mail services config'd as a Mirror of Server 1 (per multiserver instructions)...how will that affect server 2 also being a 2nd web server node with it's own separate domains than Server 1?
     
  6. till

    till Super Moderator

    In a mirror setup, all services are mirrored from one server to the other. If you add apache to your mailserver now and configure it in ispconfig, then it will start to mirror the apache configuration of the first server,you will not be able to add different websites on server 2 then the ones that you added on server1.

    But I wonder of you really have a mirror for the mailserver? The multiserver guide with separate web and mailserver is not a mirror setup.
     
  7. Turbanator

    Turbanator HowtoForge Supporter

    You're right....I turned on mirror of Server 1 since I also wanted Server 2 to be my secondary DNS server.....was that the wrong thing to do?
    Can I turn it off now without causing issues to Mail?

    And if I turn off mirroring, then Web services will work correctly as Server 1 and Server 2, but I won't have secondary dns...yes?
     
  8. till

    till Super Moderator

    I wont say it was wrong, it just causes some issues now as due to the mirror setup, your real mail server is the first server (mailboxes were created on the first server and got mirrored to the second server, it does not matter that you did not use them on the first, they exist tere and are empty) and if you would turn off mirroring now, then you will loose the connection of the mailbox settings between master and slave as the master will be the mailserver then and the settings on the slave are orpahned.

    to fix that, you would have to do some tweaks in the dbispconfig database (make a backup first on master and slave!). There are several table names that start with mail_* and spamfilter_* and inside thes tables, there is a column server_id which identifies the server were the records belong to. my guess is that server_id is "1" at the moment for all records. If you want to turn off mirroring while keeping the connection of the records on the slave, the server_id column for all of these records has to be changed to the ID of the mailserver (most likely "2", you can lookup the ID in the "server" table of the database if you are unsure.

    Yes, if you do the additional steps I explained above.
     
  9. Turbanator

    Turbanator HowtoForge Supporter

    you're right.
    mail_* on server 1 shows server_id= 1 and
    mail_* on server 2 shows server_id= 2

    So...my steps:
    1. backup
    2. update tables on Server 1 to settings server_id = 2
    3. Change Mirroring to None and uncheck DNS.

    By doing this, I also won't need to rsync or resync anything, correct? Since all the user emails are already on Server 2?
     
  10. till

    till Super Moderator

    Yes, there is no resync required.
     
  11. Turbanator

    Turbanator HowtoForge Supporter

    Worked like a charm. Thank you again.

    Next I'll activate it as 2nd web node.

    When I setup the 3rd node as a secondary DNS, will it matter if Server 1 is mydns and Server 3 will be bind? (I'm going to attempt a mydns -> bind switch at some point but I need to gather all the threads first and determine the best method)
     
  12. till

    till Super Moderator

    This does not matter.

    1) Stop ynad uninstall mydns
    2) Install bind and switch dns server to bind in ispconfig under System > server config
    3) run the ispconfig update with reconfigure services
    4) login to ispconfig and run the resync (Tools > resync) for the dns records.
    5) Check the file /var/log/syslog for errors. Mydns is more fault tolerant then bind in some cases, so it might be that bind complains about syntax issues in some zones. Check the zones in ispconfig dns module and correct the issues.
     

Share This Page