H-Sphere Documentation Sysadmin Guide

For more information contact us at info@psoft.net

Migrating Users from CPANEL

 

Migration of CPANEL accounts to H-Sphere can be done with scripts that partly automate the procedure described in Migrating Existing Users to H-Sphere chapter of Admin Guide. The migration is carried out in two stages.

1. Create the accounts on the H-Sphere boxes corresponding to those that are to be migrated from CPANEL. To do this, you need to:

1.1. Get CPANEL users data and CPANEL configuration data;
1.2. Put this user data in an xml file as described in Formatting User Data;
1.3. Create corresponding H-Sphere accounts (as in Creating Accounts) with the help of 'transferor's' Java program. This program uses the above mentioned xml file as a comand line parameter.

2. Transfer the web/mail/mysql content from CPANEL (source) boxes to H-Sphere (destination) boxes. To do this, you need to:

2.1. Archive the web/mail content of the users to be migrated;
2.2. Transfer the archived data to the H-Sphere boxes;
2.3. Unpack the archived transferred content.


Throughout the whole process, you can use several scripts to prepare the xml file (step 1.2.) and transfer the web/mail/mysql_db content (steps 2.1., 2.2.). The scripts are launched through an interactive shell program.

  • Download the archived scripts from http://www.psoft.net/shiv/CPANEL.tgz.
  • Upload the archive to all the 'source' and 'destination' boxes. In case the mailservers are located on a separate box other than the web server, upload the scripts to this server, too.
  • Unpack the uploaded archive and launch the "cpanel_migrate.sh" script from the newly created directory:
#tar xfz CPANEL.tgz
#cd CPANEL
#./cpanel_migrate.sh

You will see the following menu:

              1. Create XML file (source server)
              2. Prepare the content for downloading (source server)
              3. Download the content (destination server)
              4. Exit

Select the option relevant to the stage of your process.

Next, choose the accounts for migration. From the menu below, choose the appropriate option.

				1. Include all accounts;
				2. Include accounts from the range of accounts (alphabetic order);
				3. Include the list of accounts entered manually;

Now, let's take a closer look at each of the #./cpanel_migrate.sh script menu items:

1. Create XML file (source server)

The XML file is created on the CPANEL server. Select item 1. In the interactive mode, enter "dns name/IP address" of the server where MySQL DB is located (localhost by default), user name (root by default) and the password to MySQL DB. The users.xml file will be created in the directory where the script is executed.

NOTE: the root password to MySQL DB can be found in the "/root/.my.cnf" file. To get the password, execute the following command:

#cat ~/.my.cnf

2. Prepare the content for downloading (source server)

Before you start preparing the content for archiving, you should fill in the requests by the data mentioned in the previous paragraph. Additionally, you will have to fill in the request for the creation of unix account on the source box. The archived content will be stored in its home directory. In case such account already exists, you'll have to indicate only the path to its home directory.

NOTE: With the help of the "df" unix utility you can check which of the unix partitions is the 'largest' and create there the home directory for the user. If the biggest partition size isn't big enough, you'll have to divide the data archivation and content transfer procedure into several steps. After each step you'll have to remove the already transferred content on the 'source' box to restore the disk space.

3. Download the content (destination server)

Download the content through this option of the script menu or using any Unix FTP client. As in the previous paragraphs, you will be prompted to fill in requests (MySQL DB info, path to the directory where archieved files are located, etc.)

NOTE 1: root password to MySQL DB can be found in the "~mysql/.my.cnf" file. To get the password, execute the following command:

#cat ~mysql/.my.cnf

NOTE 2: if the smtp server is located on a different box, you should archive the directory /path_to_archive_dir/mail and transfer this archive to respective 'destination' server. Find the menu for the unpacking the mail content and execute its items.



Home   Products   Services   Partners   Support   News   Contact   Forum
© Copyright 1998-2003. Positive Software Corporation.
All rights reserved.