|
Last modified: 24 May 2005
This instruction guides you step-by-step through running the IP Migrator script which is the main part
of the IP migration procedure. The IP Migrator script is located in the
cpanel home directory. To start running the script, type:
./ipmigrator
Carefully follow the error notifications. You may also find more detailed information on the migration
process in the ~cpanel/Migration.log and the /var/log/hsphere/hsphere.log files.
IP migrator will guide you through the following steps. Let's take an example with the following physical servers:
---------------------------------------------------------------------------
Server ID Server Name Server IP Address
---------------------------------------------------------------------------
22 ns4.vps.psoft 192.168.112.234
21 ns3.vps.psoft 192.168.114.233
20 cp.vps.psoft 192.168.112.232
---------------------------------------------------------------------------
Step 1. Changing Physical Server IPs
Enter ID of the server you want to change IPs for. Type [q] to quit the script or [-] to skip this
step.
Enter new 192.168.112.233 IP for ns3.vps.psoft:
[IPMigrator]: 192.168.112.233
Uploading front-end migration scripts...
=== 192.168.112.233 ===
Step 2. Preparing IP migration map
On this step, create or edit IP migration map. If you quit right after editing or creating the file, your
changes won't be lost.
Enter:
- [f] to use existing IP migration map XML file
- [l] to transform existing IP map plain text file with whitespace separated values to XML format
- [c] to create a new IP map XML structured file based on your H-Sphere boxe(s) configuration
- [e] to set the editor to open the IP map file with. By default, it is [vi]
- [b] to go back to the previous step
- [q] to quit the script
By default, script looks for the file in the current directory. Specify the full path if you have it in a different
location.
Examples:
[IPMigrator]: f
Current directory is: /hsphere/local/home/cpanel/
Enter the filename: ipm1.xml
[IPMigrator]: l
Current directory is: /hsphere/local/home/cpanel/
Enter the plain (text file with whitespace separated values) IP map file name to load from: ipm1.txt
Current directory is: /hsphere/local/home/cpanel/
Enter the new (XML structured) IP map file name to load into: ipm1.xml
[IPMigrator]: c
Current directory is: /hsphere/local/home/cpanel/
Enter the plain IP map new file name be generated: ipm2.txt
Step 3. Reposting configs
Important!
If you are migrating IPs of your webserver(s), check the corresponding logical server(s).
On this step, check logical web servers you want to repost apache configurations for. Say, you have the following
logical web servers:
---------------------------------------------------------------------------
ID Server Name Server Role Process
---------------------------------------------------------------------------
27 web2.vps.psoft web servers No
24 web.vps.psoft web servers No
31 web3.vps.psoft web servers No
---------------------------------------------------------------------------
Enter:
- [server_id] ID of the server you want to add to the migration list
- [-] to start the migration
- [b] to go back to the previous step
- [q] to quit the script
Example:
Step 4. Final check
Warning!
The rest of the steps imply physical changes. If you don't want the migration to continue, make sure to quit the script now.
On this step check which files on your servers would be changed, except for H-Sphere dependent resources.
Enter:
- [server_id] ID of the server you want to preview the changes for
- [-] to continue
- [r] to roll the changes back
- [b] to go back to the previous step
- [q] to quit the script
[IPMigrator]: 320
Line 8: CP_HOST = 192.168.112.232
Line 119: PATH_SITE_STUDIO = http://192.168.112.232:8080/studio/servlet/psoft.masonry.Builder
----
File /hsphere/local/home/cpanel/shiva/psoft_config/hsphere.properties
IP entries: --- 2
----------------
Line 2: 192.168.112.232:allow,RELAYCLIENT=""
Line 3: 192.168.112.233:allow,RELAYCLIENT=""
Line 4: 192.168.112.234:allow,RELAYCLIENT=""
----
File /hsphere/local/var/vpopmail/etc/tcp.smtp
IP entries: --- 3
----------------
Line 6: $cfgServers[1]['host'] = '192.168.112.233';
----
File /hsphere/shared/apache/htdocs/phpMyAdmin/config.inc.php
IP entries: --- 1
----------------
Line 21: <A href="http://192.168.112.232/cgi-bin/sqwebmail">SQWebMail - mail client</A>><BR>
Line 22: <A href="http://192.168.112.232/horde/index.php">IMP - mail client</A><BR>
Line 23: <A href="http://192.168.112.232:8080/psoft/servlet/psoft.hsphere.CP?action=change_mbox_password">Change your POP3 password</A><BR>
----
File /hsphere/shared/apache/htdocs/index.html
IP entries: --- 3
----------------
Line 288: <VirtualHost 192.168.112.232>
Line 296: ServerName 192.168.112.232
Line 310: #<VirtualHost #192.168.112.232>
Line 318: #ServerName #192.168.112.232
----
File /hsphere/local/config/httpd/httpd.conf
IP entries: --- 4
----------------
Line 3: Bind 192.168.112.232
----
File /hsphere/local/config/ftpd/proftpd.conf
IP entries: --- 1
----------------
Line 4: 192.168.112.236;
Line 5: 192.168.112.232; };
----
File /etc/named.conf
IP entries: --- 2
----------------
Line 1: 192.168.112.236 255.255.255.0
Line 2: 192.168.112.232 255.255.255.0
Line 3: 192.168.112.232 255.255.255.0
----
File /hsphere/local/network/ips
IP entries: --- 3
----------------
Line 2: 192.168.112.236 vps1.psoft
Line 3: 192.168.112.232 vps1.psoft
Line 4: 192.168.112.232 cp.vps.psoft
Line 5: 192.168.112.232 cp.vps.psoft
Line 6: 192.168.112.236 cp.vps.psoft
Line 7: 192.168.112.232 cp.vps.psoft
Line 9: 192.168.112.232 cp.vps.psoft
Line 10: 192.168.112.236 cp.vps.psoft
----
File /etc/hosts
IP entries: --- 8
----------------
Line 1: nameserver 192.168.112.232
Line 2: nameserver 192.168.112.236
Line 3: nameserver 192.168.112.233
Line 4: nameserver 192.168.112.234
----
File /etc/resolv.conf
IP entries: --- 4
----------------
----------------
If you want to proceed the IP changes in the files listed abowe use
the following command:
/hsphere/shared/scripts/ipm/ipmigr --action=process --scode=mncw < ipmigration.xml
If you don't want to proceed any changes you can clear the temporary files by
running the following command:
/hsphere/shared/scripts/ipm/ipmigr --action=clear --scode=mncw < ipmigration.xml
Step 5. Changing system and logical IPs
The process will take a while to complete.
Example:
Changing IPs in:
---------------------------------------------------------------------------
H-Sphere Database...
Done
---------------------------------------------------------------------------
Server configuration files...
Done
---------------------------------------------------------------------------
Changing IP Dependent resources...
Done
---------------------------------------------------------------------------
Fixing service zones
Done
---------------------------------------------------------------------------
Fixing Custom records
Done
---------------------------------------------------------------------------
Reposting SSL CP VHost configs
Done
---------------------------------------------------------------------------
Press Enter to continue:
When you have finished running the Ip Migrator script, go on with the IP migration.
|