This document explains how to move a domain with its content, subdomains,
and site settings from one Unix account to another using a built-in java class
that comes with H-Sphere 2.3.1 and higher.
Restrictions
- The accounts must be located on the same server
- Domain mover works only with Unix servers and doesn't support Windows accounts
Procedure
- Create the new account (you may already have it created).
- Log into your corresponding web server as root:
su -
- As root, copy the domain directory with all its content to the home of the new
account and change the ownership of the files to the new account.
Example:
cp -r /hsphere/local/home/user1/xyz.com /hsphere/local/home/userd2
chown -R userd2:userd2 /hsphere/local/home/userd2/xyz.com
- Log into control panel server as the cpanel user:
su -l cpanel
- As cpanel, run DomainMover with the command:
java psoft.hsphere.tools.DomainMover xyz.com userd2
Note: If you are moving domains between two accounts with the same name, you can run the following tool:
java psoft.hsphere.tools.DomainMover xyz.com account_id
- Restart H-Sphere.
- Log into the new account, go to WebServices, select the new domain if
you don't get into it right away, and click Apply Changes.
- If this domain uses SSL, go to the old account's home directory,
enter ssl_conf, copy the keys (not the files), then log into the
new account's control panel and enter the keys.
Note: As the result of domain migration, the log
history of this domain will be lost.
Compatibility
It's very important that accounts belong to compatible plans.
If the target plan doesn't have a resource used by the domain, the resource
will be lost during the move. As a result, you may start getting java exceptions
saying that the class is unknown. As a workaround, go to the plan editor and
enable and then disable the resource to turn it off correctly.
Note: avoid moving domains from accounts under the E-Mail Only
plans to accounts under Unix or Windows hosting plans.
More on compatible plans.
Manual Domain Move
If the domain has a dedicated IP or you can't use the java class for any other
reason, you can still migrate the domain, but the site settings will be lost:
- Remove the domain (NOT the account) in the old user's CP. Make sure not to check
the domain name at the 'Remove web content' step to keep the content.
- Create exactly the same domain in the new user's CP.
- Transfer all content from the old user's directory to that
of the new one either by FTP or by using the mv command as root,
in which case you need to change file ownership.
Note: If FrontPage was enabled in the original site,
fix FrontPage from the user control panel to update the directory paths.
|