Moving ispconfig3 on a new server

Discussion in 'General' started by dsautet, Jun 18, 2012.

  1. dsautet

    dsautet New Member

    Hello,

    Actually I have two servers, one for my wesite and another for the mails.

    In fact, I would like to transfert all the data from these servers to my new one.

    Can I do that or I have two move to two differents servers?

    All of my servers are equiped with linux and I install ISPconfig3 on the new server.

    Here is my approach to move the data from the web server to the new one:


    First I take my www folder :

    tar -pczf www.tar.gz /var/www/

    Then I save all the databases :
    mysqldump -h localhost -uroot -p -c --add-drop-table --add-locks --all --quick --lock-tables --all-databases > sqldump.sql

    I also take the passwd, shadow and group files.

    And then I copy all these informations in my new server.

    For information, the root password and rights will be the same.

    Is this a good approach or I miss something?



    Here is my approach to move the data from the mail server to the new one:


    tar -pczf www.tar.gz /var/vmail/

    mysqldump -h localhost -uroot -p -c --add-drop-table --add-locks --all --quick --lock-tables --all-databases > sqldumpmails.sql



    Somebody can help me on that?


    Thanks a lot!! :)
     
  2. dsautet

    dsautet New Member

    Nobody can help me?
     
  3. Mark_NL

    Mark_NL Member

    Looks ok ..

    Install ISPC3 on the new server. make a db dump of all databases, import them on the new one (don't forget db: mysql, it contains the users)

    copy /var/www and /var/vmail to the new system, copy /etc/passwd and shadow entries. done.

    make sure the dbispconfig user password is the same, else services like postfix cannot talk to your database. ;-)
     
  4. dsautet

    dsautet New Member

    Thank you for reply!

    My problem is that the databases on the two servers are not the same. For example this is not the same users. So if I dump the databases on my old servers to the new the last one will erase the first one.

    I hope you understand my problem.

    Thanks
     
  5. Mark_NL

    Mark_NL Member

    Oke, so you already have websites running on the new server, bad idea!

    Now it just became a "merge" which is more work.

    Better merge to the server which already has the most data (since the merge needs to be done manually in the ISPC3 webgui). Then you have one server with all data again which you can easily move to a new server again.

    So create the users / sites / databases and everything through the ispconfig web interface and then copy / dump the data to each dir / database and set user permissions correctly.
     
  6. ikrudolf

    ikrudolf Member

    Mark,
    How to check if the dbispconfig user password is the same?
    How to copy shadow entries?
     
  7. Mark_NL

    Mark_NL Member

    run this command on both servers:
    Code:
    grep "db_password'] =" /usr/local/ispconfig/server/lib/config.inc.php
    shadow file is "/etc/shadow". You can only read/copy it when you're user root.
     

Share This Page