Need to take information from Old Server
Hostname
Check how many additional Ips
added to the server
Check Nameserver Information
(/etc/nameserverips)
Need to copy Packages from
/var/cpanel/packages
Check Backup is available up
to date
Check Mysql version (Version
should be the same on both servers)
Check PHP version and Modules
If its production server
Please deny SMTP port no 25
Backup these files on both
servers:
a)
/usr/local/apache/conf/httpd.conf
b)
/usr/local/lib/php.ini
c)
/etc/named.conf
d)
tar –cvf /var/named.tar /var/named
Check PHP and SuExec
configuration
root@server [~]# /usr/local/cpanel/bin/rebuild_phpconf
--current
Available handlers: suphp dso cgi none
DEFAULT PHP: 5
PHP4 SAPI: suphp
PHP5 SAPI: suphp
SUEXEC: enabled
Steps to Migrate on New Server
Install cPanel with the new
server
Set the Hostname
Setup the Name servers
Add Additional Ips
Add the Iptables rules from
our support desk ----> Manage articles --à
iptables
Compile the Apche with PHP
with Old Configuration like zend optimizer,mysqli,pgsql and other required
modules
Check PHP and SuExec
configuration and configure like as old server
Untar the packages from
/var/cpanel/packages (Old Server)
Do the preset up document
which is available in our forum
There are two option you can do Migration
a) After login to
WHM on the new server as root then:
ü
Click on copy
multiple accounts
ü
Fill out
the old server data
ü
Select
accounts to transfer
ü
Initiate the
transfer process
b) You can use the below scripts to transfer
ü
Go to
/backup/cpbackup/daily or weekly or monthly directory
ü
Execute this
command ls |grep "tar.gz"| cut -f1 -d".">rambabu , This
command will took the user name and will
export to rambabu file
ü
Create the /web
directory
ü
Create the
shell script file and add the below scripts and execute the script under screen
for migration
********************************************************
#!/bin/bash
for
i in `cat /backup/cpbackup/daily/rambabu`
do
echo
"Restoring $i"
echo
"Restoring $i">>Tasksummary.txt
echo
"Copying $i.tar.gz"
cp
/backup/cpbackup/daily/$i.tar.gz /web >>Tasksummary.txt
if
[ "$?" = "0" ]; then
{
echo "Copying $i.tar.gz
finished.">>Tasksummary.txt
}
else
{
echo "Copying backup failed $i
completed">>Tasksummary.txt
echo "Please copy
$i.tar.gz from "/backup/cpbackup/daily/ to
/web">>Tasksummary.txt
echo "Please press ENTER
after copying">>Tasksummary.txt
echo "Copying backup failed $i"
echo "Please copy
$i.tar.gz from "/backup/cpbackup/daily/ to /web"
echo "Please press ENTER
after copying"
read
}
fi
/scripts/restorepkg
$i>>Tasksummary.txt
if
[ "$?" = "0" ]; then
{
echo "Restoring $i
completed">>Tasksummary.txt
}
else
{
echo "Restoring $i
FAILED">>Tasksummary.txt
echo "Restoring $i FAILED.
Please acknowledge:"
read
}
fi
echo
"Completed $i">>Tasksummary.txt
echo
"Completed $i"
echo
"Will Continue after 10 seconds...."
sleep
10
done