User Tools

Site Tools


ispcp-move

ISPCP 1.0.7 server migration made easy

After some migrations of the (very) old ispcp 1.0.7 to new servers before upgrading to i-mscp 1.2.15 I have a little “how to” for this.

You should do this ONLY if you cannot update your old debian (4-6) any more! So this is more a workaround and may be adopted for i-mscp as well!

First: All Domains/Users must be active! Do not deactivate users or domains when running the rsyncs!

Install ispcp on the new server

run the following commands as root

# apt-get install aptitude && aptitude update && aptitude safe-upgrade && aptitude install tar bzip2 wget lsb-release nano mc && aptitude update
# aptitude safe-upgrade && mkdir -p /root/ispcp && cd /root/ispcp
# wget http://freefr.dl.sourceforge.net/project/ispcp/ispCP%20Omega/ispCP%20Omega%201.0.7/ispcp-omega-1.0.7.tar.bz2 && tar -xvf ispcp-omega-1.0.7.tar.bz2
# cd ispcp-omega-1.0.7 && aptitude install $(cat ./docs/Debian/debian-packages-squeeze) && make install && cp -R /tmp/ispcp/* /
# mysql_secure_installation && cd /var/www/ispcp/engine/setup && perl ./ispcp-setup && rm -fR /tmp/ispcp

This will install ispcp 1.0.7 on any debian till 7 (8 not tested, may not work because of apache 2.4)

IF you have some problems with fastcgi get this file (and replace here /var/www/ispcp/engine/setup):

Copy data **to** new server

This is the tricky part, as you will need any data to run the new installed system but still have access to the new system. Changing IPs, Domains, mySQL User and Password for debian and so on

replace the ssh with “ssh -p XX” → where XX is the port if it is other than 22!

Do this on your old server:

# cat /etc/passwd | grep '^vu.*:' > /root/passwd.vu
# cat /etc/group | grep '^vu.*:' > /root/group.vu
# cat /etc/shadow | grep '^vu.*:' > /root/shadow.vu
# rsync -az -e ssh /etc/courier/* IP-of-new-server:/etc/courier
# rsync -az -e ssh /etc/postfix/* IP-of-new-server:/etc/postfix
# rsync -az -e ssh /etc/proftpd.conf IP-of-new-server:/etc/proftp
# rsync -az -e ssh /etc/proftpd/* IP-of-new-server:/etc/proftpd
# scp /root/*.vu root@IP-of-new-server:/root/
# rsync -az -e ssh /root/*.vu IP-of-new-server:/root/
# rsync -az -e ssh /etc/ispcp/ispcp.conf IP-of-new-server:/etc/ispcp/ispcp.conf.old
# rsync -az -e ssh /var/www/ispcp/engine/ispcp-db-keys.pl IP-of-new-server:/var/www/ispcp/engine/
# rsync -az -e ssh /var/www/ispcp/engine/messenger/ispcp-db-keys.pl IP-of-new-server:/var/www/ispcp/engine/messenger
# rsync -az -e ssh /var/www/ispcp/gui/include/ispcp-db-keys.pl IP-of-new-server:/var/www/ispcp/gui/include/
# rsync -az -e ssh /var/www/ispcp/gui/include/ispcp-db-keys.php IP-of-new-server:/var/www/ispcp/gui/include/
# rsync -az -e ssh /var/www/ispcp/gui/tools/pma/ispcp-db-keys.php IP-of-new-server:/var/www/ispcp/gui/tools/pma
# rsync -az -e ssh /var/www/ispcp/gui/tools/pma/config.inc.php IP-of-new-server:/var/www/ispcp/gui/tools/pma

After all your ispcp data has been copied, you can now start with the user-data:

# mysqldump --all-databases --opt -Qc --add-drop-database -p -r /root/mysqldump.sql

Will do a complete backup of all your mysql databases. Remember: ALL your data! Including systempasswords as in /etc/mysql/debian.cnf (I would not just copy the file, just change the passwords here)

# rsync -az -e ssh /root/mysqldump.sql IP-of-new-server:/root/
# rsync -az -e ssh /var/www/virtual/* IP-of-new-server:/var/www/virtual
# rsync -az -e ssh /var/mail/virtual/* IP-of-new-server:/var/mail/virtual/

Things to do on the new server now

Get the old users (please check there are no double vu*s!) Restore the Database and run the request manager.

# cat /root/passwd.vu >> /etc/passwd
# cat /root/group.vu >> /etc/group
# cat /root/shadow.vu >> /etc/shadow
# mysql -p < /root/mysqldump.sql
# /var/www/ispcp/engine/ispcp-rqst-mngr

You made it!

Finally change the ip on your DNS, shut down the services on the old server and have a look at the logs of your new server.

Simply restart anything on the old server if there are some errors on the new one. Now do the migration to i-mscp 1.2.15

You can rsync the mails after 1 day or so again, just to be shure there is no new mail on the old server.

Have fun and PLEASE DO NOT USE ispCP IN 2016!

Joe Strackar 2016/03/23 07:33

/var/www/virtual/i-mscp.net/wiki/htdocs/data/pages/ispcp-move.txt · Last modified: 2016/06/30 13:40 by nuxwin