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
- The accounts must belong to compatible plans
- Domain mover works only with Unix servers and doesn't support Windows accounts
- The domain must run on a shared IP (for dedicated IP domains see Manual Domain Move)
Procedure
- Create the new account (you may already have it created).
- Log into your control panel 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 in as the cpanel user:
su - cpanel
- As cpanel, run DomainMover with the command:
java psoft.hsphere.tools.DomainMover xyz.com userd2
- Restart control panel.
- 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
If the 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
then disable the resource to turn it off correctly.
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.
|