Server change and reinstall

Discussion in 'General' started by DarkBen, Feb 8, 2006.

  1. DarkBen

    DarkBen New Member

    Hi,

    could you explain to me the procedure i need to follow to copy my ISPConfig datas on a new server ?

    My server is too old for supporting charge and i need to change it.

    I want to install ISPConfig on a new server : AMD 64 bits or pentium ? What do you advise ? I want to install it on Debian 3.1 (Amd 64 bits seems to be a bad choice...)

    I think i need to do that :

    1) New debian and ISPConfig install

    2) Copy /etc/passwd.
    /etc/shadow.
    /etc/group.
    /etc/gshadow.
    /etc/apache2.


    3) Copy /var


    Do i need to have the same server name or that is not important ? (ISPConfig database have a field with that information...)

    Thanks for your help, i need to do that today because my old server will be die soon...
     
    Last edited: Feb 8, 2006
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Install the same ISPConfig version on both servers.

    2) Replace the ISPConfig database on the new server with a copy of the old database. But dont overwrite the table isp_server, it contains the server specific config from the installation process!


    3) Copy the config files to your new server:

    - named.conf and the DNS domain files
    - /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow but only the users that where created by ISPConfig in these files.
    - /etc/postfix/local-host-names, /etc/postfix/virtusertable
    - /etc/httpd/vhosts/Vhost_ispconfig.conf

    4) Copy the website directory (home/www or /var/www) to your new server with preserved permissions and rights.

    5) Copy client mySQL databases to your new server.

    6) If you use mbox files, dont forget to copy them from /var/spool/mail to your new server
     
  3. DarkBen

    DarkBen New Member

    Thanks a lot Till !!

    >>5) Copy client mySQL databases to your new server.

    Can i copy /var/lib/mysql ?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe. I wont copy the whole directory, just the subdirectorys with the client databases. Dont forget to stop your mysql server first. Later you can export the mysql users from the mysql database with e.g. phpmyadmin or try to copy also the mysql database, but I'am not sure if you might get problems with different mysql versions.
     
  5. DarkBen

    DarkBen New Member

    Ok,

    I want to copy the files with this command (disk with datas slave)

    Code:
    cp -r -p /var/www /var
    is it ok ?
     
  6. falko

    falko Super Moderator ISPConfig Developer

    I think this way you will copy /var/www to itself. You should copy it elsewhere, e.g.
    Code:
    cp -pfr /var/www /home
     
  7. DarkBen

    DarkBen New Member

    >>think this way you will copy /var/www to itself.

    you are right, it is stupid :eek:)

    i want to do that :

    cp -pfr /mnt/olddisk/var/www /var

    it is ok ?
     
  8. falko

    falko Super Moderator ISPConfig Developer

    That's ok.
     
  9. DarkBen

    DarkBen New Member

    Another question about my reinstall :

    My "old" server has a 2.4 kernel. Should i reinstall my new ISPConfig with the same kernel or can i choose the 2.6 ?

    I change all my config : i bought a P4 630+ 3Ghz (replacing my Athlon XP 3000).

    I hope it will be self-important... :eek:)
     
  10. falko

    falko Super Moderator ISPConfig Developer

    You can use a 2.6 kernel.

    That's ok.
     
  11. DarkBen

    DarkBen New Member

    Ok,

    last question :)

    Can i change IP Address of my new server after install from ISPConfig admin pages ? I don't want to reconfigure all my DNS domain files. How can i do it ?

    Thanks for your help !
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    The IP is stored in ISPConfig under server > management > settings.

    After you changed the IP there, you will have to change the IP in your linux network configuration
     
  13. DarkBen

    DarkBen New Member

    That is ok ! i installed ISPConfig and migrated all the datas on my new server. Thanks a lot for your help ! I want to describe what i done to help the ISPConfig community ;)

    1) I installed Sarge 3.1 + ISPConfig (Perfect setup) on my new server. In hostname i have the same name that my old server but i configured it with another IP address.

    2) I stopped ISPConfig on my old server and created a tarball with :

    /etc/passwd

    /etc/shadow

    /etc/group

    /etc/gshadow

    Code:
    tar pczf /home/backup/users_conf.tar.gz /etc/passwd /etc/shadow /etc/group /etc/gshadow

    3) I stopped all the services and created 4 others tarball :

    one for postfix files i needed :

    /etc/postfix/local-host-names

    /etc/postfix/vitusertable

    Code:
    tar pczf /home/backup/postfix.tar.gz /etc/postfix/local-host-names /etc/postfix/vitusertable
    second one with apache2 file :

    /etc/apache2/vhosts/Vhosts_ispconfig.conf

    Code:
    tar pczf /home/backup/apache2.tar.gz /etc/apache2/vhosts/Vhosts_ispconfig.conf
    Third file with mysql databases :

    /var/lib/mysql

    Code:
    tar pczf /home/backup/mysql.tar.gz /var/lib/mysql
    Fourth file with /var/www

    Code:
    tar pczf /home/backup/www.tar.gz /var/www
    And don't forget DNS zone files in /etc/bind if you have it...

    4) I transferred all my tarballs on my new server and decompressed them.

    For the users files, i copied only the ISPConfig users like Till said

    I needed to change /etc/mysql/debian.cnf : I had an error when MYSQL started because the password in /etc/mysql/debian.cnf was not ok. I copied the old password on my new server.

    I needed to do a chown on /home/admispconfig

    Code:
    chown -R admispconfig:admispconfig /home/admispconfig
    5) I halted my old server. I changed IP address of my new server :

    in /etc/hosts

    and /etc/network/interfaces

    I crossed my fingers i rebooted my new server and all was ok !!!!

    6) I recreated rules for my Firewall and rebooted it.

    7) I went to bed at 5 AM :eek:


    Now my load average is near 0.5 and all is ok :eek:

    Thanks Falko & Till for your help and sorry for my bad english !
     
    Last edited: Feb 16, 2006

Share This Page