Migrate from ispcp 1.0.7 Remote system

  • Hi All,


    I like what you have made with this panel, and am switching from ispcp 1.0.7.


    I would like to know if there's a way to migrate from a remote system (a different machine on the same internal network). As in, what could I change in the imscp-migrate-from-ispcp script?


    I am trying to go from an Ubuntu 10.10 ispcp system to a fresh Debian Squeeze system.


    Any pointers or advice would be greatly appreciated. If I have to do it manually, things could get ugly :P


    Thanks!


  • You can follow the instrucctions here:
    http://wiki.i-mscp.net/doku.php?id=migration:ispcp
    But please, do it with a copy, because it's work in progress (I'd recommend to test with current trunk).
    And IMPORTANT: You have to cancel the setup before installing i-mscp to be able to run the "perl imscp-migrate-from-ispcp" command, otherwise you might break lots of things.


    Other than that, the process i quite save and most of the standard things will work (plus the benefits of migrating)


    UPDATE Migrating from ubuntu to debian and from ispcp to i-mscp can be difficult even though the two linux flavours are quite similar. If I were you, I'd made the two processes separately.

    Edited once, last by aseques ().


  • Yes, I've seen the migration wiki and read through the perl script a bit, but it is only for migrating from ispcp on the same machine. I am trying to migrate from a different machine over, so it fails, saying the directories don't exist, etc.


    I was wondering if anyone has a workaround, or know how to modify in some variables or something into the script, so I can tell it to migrate from a remote machine, using a different IP and nsh or something. I can modify the rest to make it work coming from Ubuntu, and I will make that modified script available to everyone of course.

  • you have to replicate all ispcp folders and databases (with users) from one computer to other one.
    Folders needed:
    /etc/ispcp
    /var/www
    /var.mail/virtual
    More problematic is to migrate all db and user rights, but if you manage do that properly, migration will take care of rest.

  • I´m in the same situation and started already with the same migration.
    Here is my current way


    • Install ispCP 1.0.7 on the new Server
    • Use same MySQL root pass during the install
    • Export the whole MySQL Database on the old Server
    • Import the MySQL-Dump on the new Server
    • Correct debian-system-control user in the database
    • Copy all ispcp-db-keys from old Server to new Server
    • Set everything in the database to "toadd" and start ispCP daemon
    • Check the new added folders under /var/www/virtual, /var/mail/virtual
    • Check the /etc/passwd and /etc/group
    • Start the ispcp migrate to i-mscp script
    • Sync /var/www/virtual, /var/mail/virtual


    Well, this is more ore less my masterplan :D
    Don´t know if it works...currently im at the database check during migrate script.


    Greez BeNe

  • How did it go, BeNe?


    I'm trying to do it without installing ispCP on the new system, not sure if it will work or not :P


    This is also of course if the new server will have the same hostname and IP as the old server. (but if different, that can be dealt with with find/replace to certain config files, I imagine, as I've done it with IP changes in apache configs)


    So I've imported the mysql db's and privileges...
    rsync'd the /var/www/virtual/, /var/www/ispcp/, /var/www/fcgi/, and /var/mail/virtual/ folders
    rsync'd /etc/apache/*
    rsync'd /etc/postfix/master.cf and main.cf and /etc/postfix/ispcp
    rsync'd /etc/proftpd/ispcp/ and /etc/proftpd/proftpd.conf
    rsync'd /etc/bind/* and put bind.keys and rndc.key back (took backup on new server before rsync)
    suppose I'll tend to /etc/passwd and /etc/group to get those users over too (always had to when rebuilding the ispCP server before, basically starting with v2000 and onward, appending the existing passwd and group files on the new system)
    then run the migration script and see what happens :P


    I'll keep updating as to any progress I make. These are all processes that can be turned into its own script for others to use in moving to a new, fresh i-MSCP server, which I believe is of course the best way to do thing (especially for those of us running virtual environments).

    Edited once, last by anarking ().

  • okay the i-mscp migration script can't be fooled like that, it definitely wants ispCP installed and running. so I've just reverted to a clean system and installed ispcp 1.0.7 and will redo the steps I've outlined above, and try again from there...

  • this is how i migrated to a fresh server from ispCP 1.0.7, successfully :P (both systems debian squeeze)


    install ispCP 1.0.7 on the new system, choose same options and same passwords as old system. note that this method is for a new system with the same hostname and same IP address as the old system.


    export all db's from the old server except information_schema and mysql (mysqldump or through phpma)
    export the mysql database individually
    import the databases into the new mysql server.
    after import go to mysql command, "use mysql;" then "source mysqlbackupfile.sql;" (this will copy over the privileges)


    now copy files from the old server to the new one (i did these with rsync -rav)


    rsync'd the /var/www/virtual/, /var/www/ispcp/, /var/www/fcgi/, and /var/mail/virtual/ folders
    rsync'd /etc/apache/*
    rsync'd /etc/postfix/ispcp (/etc/postfix/master.cf and main.cf if custom, keep in mind if you've done spamassassin, etc. you will need to accommodate for that as well) - also note: change in main.cf references of /ispcp/transport and aliases, etc. to /imscp/
    rsync'd /etc/proftpd/ispcp/ and /etc/proftpd/proftpd.conf
    rsync'd /etc/bind/* and put bind.keys and rndc.key back (took backup on new server before rsync)
    copy /etc/passwd and /etc/group to a temp location on the new server, and append the vu2001 and up users to the new server's existing passwd and group files. i just did cat passwdtmp >>passwd and straightened out the file, etc.


    since copying /var/www/ispcp over was the easiest way (it gets custom pages, etc, as well as the keys BeNe mentioned), the database password has to be updated as outlined below:


    Code:
    nano /etc/ispcp/ispcp.conf


    Remove the hash from DATABASE_PASSWORD so the line only reads as
    Code:
    DATABASE_PASSWORD =


    Next you need to put in your current mysql password
    Code:
    /var/www/ispcp/engine/ispcp-db-passwd


    Now for the important part you need to copy the new hash from DATABASE_PASSWORD = newhash
    Code:
    nano /etc/ispcp/ispcp.conf


    Then replace the old hash in this file with the new hash you just copied
    Code:
    nano /etc/ispcp/ispcp.old.conf



    Do a reboot and see if you've got a working system (with the old server not occupying the IP [turned off], etc.)


    At this point I was fully functional, and was able to proceed successfully with the regular i-MSCP migration instructions.


    by the way, it looks awesome and the feature adds you guys have done are fantastic, great work!

    Edited once, last by anarking ().

  • Hi all... perhaps some of you know me as ispcomm from the ispcp forum. I have not been participating much there and this is my first post here.


    I don't want to steal the thread, however I must share with you my opinion and propose a solution.


    I think this whole issue is approached from the wrong way. A migration ispcp to imspc (ouch what a name!), specially between two different servers (possibly) running different distros and daemons (i.e. dovecot vs courier or fcgid vs itk) should not have been attempted trying to "cross-configure" and "cross-update" the mysql database and configuration files.


    A much easier backup-restore mechanism should have been used, where the full-backup of a "user", intended as mail/web data and all accounts (dbase,mail,ftp etc) could be created from ispcp and restored to another server, being imspc.


    I do have some custom-created in-house scripts for my own ispcp multiserver branch of ispcp that I could contribute, if anybody is interested in getting that code and adapting it to i-mscp.


    These could be used also as a full backup solution of single domains.


    Ispcomm.