How to: Move a Domain to Another SiteWorx Account¶
InterWorx allows the ability to move a domain from one SiteWorx account to another. The domain must be a secondary domain. If the domain that needs to be moved is currently the primary domain for a SiteWorx account, it must be demoted to a secondary domain, first. This can be accomplished using the Domain Promoter tool. Detailed information can be found here.
Contents
To Move an Existing Secondary Domain to Another SiteWorx Account¶
Note
For the purpose of the following examples:
secondarywebsite.com is a secondary domain listed under a SiteWorx account with mywebsite.com as its primary domain
The goal is to move secondarywebsite.com to be listed under a different SiteWorx account, that has new.com as its primary domain
secondarywebsite.com will be backed up and deleted from the mywebsite.com SiteWorx account. That backup will be imported to the new.com SiteWorx account. The IP associated with secondaryweb.com will also be added to the new.com SiteWorx account
Log in to the server at the CLI as root, either via SSH or from the terminal
At the CLI, create a temporary backup directory (skip this step if an existing directory is preferred. The backups cannot use the default location, as the domain will be deleted, which also deletes the default location)
mkdir /tmpbackup
Create a backup of the secondary domain, using the temporary backup directory, replacing
{secondary domain}
with the domain that will be moved~iworx/bin/backup.pex --domain {secondary domain} -o /tmpbackup
Example:
~iworx/bin/backup.pex --domain secondarywebsite.com -o /tmpbackup
Add the IP associated with the secondary domain to the new SiteWorx account, if it is not already. This can be accomplished either via NodeWorx, or at the CLI with the following, replacing
{ip address}
and{new primary domain}
with the corresponding information:nodeworx -u -n -c Siteworx -a addIp --ipv4 {ip address} --domain {new primary domain}
Example:
nodeworx -u -n -c SiteWorx -a addIp --ipv4 123.45.678 --domain new.com
Delete the secondary domain. This can be accomplished either via SiteWorx, or at the CLI with the following, replacing
{current primary domain}
and{secondary domain}
with the corresponding information:siteworx -u --login_domain {current primary domain} -n -c DomainsManage -a delete --domain {secondary domain}
Example:
siteworx -u --login_domain mywebsite.com -n -c DomainsManage -a delete --domain secondarywebsite.com
Import the backup, replacing
{path to backup}
,{ip address}
, and{new primary domain}
with the corresponding information~iworx/bin/import.pex --archive {path to backup} --control-panel siteworx --ipv4 {ip address} --master-domain {new primary domain}
Example:
~iworx/bin/import.pex --archive /tmpbackup/secondarywebsite.com-partial-01-02-2022.tgz --control-panel siteworx --ipv4 123.45.678 --master-domain new.com
To Move a Primary Domain to Another SiteWorx Account¶
Note
For the purpose of the following examples:
mywebsite.com is the primary domain of a SiteWorx account
The goal is to move mywebsite.com to be listed as a secondary domain under a different SiteWorx account that has new.com as its primary domain
Since only secondary domains can be moved:
A secondary domain named hello.com will be created
hello.com will be promoted to the primary domain of the SiteWorx account, which will demote mywebsite.com to be a secondary domain
mywebsite.com will be backed up and deleted from the hello.com SiteWorx account. That backup will be imported to the new.com SiteWorx account. The IP associated with mywebsite.com will also be added to the new.com SiteWorx account
Log in to the server at the CLI as root, either via SSH or from the terminal
If a secondary domain does not already exist in the current SiteWorx account, create one. This is needed to demote the current primary domain. This can be accomplished either via SiteWorx, or at the CLI with the following, replacing
{current primary domain}
, and{new secondary domain}
with the corresponding information:siteworx -u --login_domain {current primary domain} -n -c DomainsManage -a add --domain {new secondary domain}
Example:
siteworx -u --login_domain mywebsite.com -n -c DomainsManage -a add --domain hello.com
Use the Domain Promoter tool to promote the new secondary domain to be the primary domain of the SiteWorx account. This demotes the current primary domain to a secondary domain. In the following, replace
{current primary domain}
and{new secondary domain}
, with the corresponding information:~iworx/bin/domain-promoter.pex --secondary-to-primary --primary-domain {current primary domain} --secondary-domain {new secondary domain}
Example:
~iworx/bin/domain-promoter.pex --secondary-to-primary --primary-domain mywebsite.com --secondary-domain hello.com
Note
hello.com is now the primary domain of the SiteWorx accountmywebsite.com is now a secondary domain under that same SiteWorx accountFrom this point, forward, the steps are the same as To Move an Existing Secondary Domain to Another SiteWorx Account.At the CLI, create a temporary backup directory (skip this step if an existing directory is preferred. The backups cannot use the default location, as the domain will be deleted, which also deletes the default location)
mkdir /tmpbackup
Create a backup of what is now the secondary domain, using the temporary backup directory, replacing
{secondary domain}
with the domain that will be moved~iworx/bin/backup.pex --domain {secondary domain} -o /tmpbackup
Example:
~iworx/bin/backup.pex --domain mywebsite.com -o /tmpbackup
Add the IP associated with what is now the secondary domain to the new SiteWorx account, if it is not already. This can be accomplished either via NodeWorx, or at the CLI with the following, replacing
{ip address}
and{new primary domain}
with the corresponding information:nodeworx -u -n -c Siteworx -a addIp --ipv4 {ip address} --domain {new primary domain}
Example:
nodeworx -u -n -c Siteworx -a addIp --ipv4 123.45.678 --domain new.com
Delete what is now the secondary domain. This can be accomplished either via SiteWorx, or at the CLI with the following, replacing
{current primary domain}
and{secondary domain}
with the corresponding information:siteworx -u --login_domain {current primary domain} -n -c DomainsManage -a delete --domain {secondary domain}
Example:
siteworx -u --login_domain hello.com -n -c DomainsManage -a delete --domain mywebsite.com
Import the backup, replacing
{path to backup}
,{IP address}
, and{new primary domain}
with the corresponding information~iworx/bin/import.pex --archive {path to backup} --control-panel siteworx --ipv4 {IP address} --master-domain {new primary domain}
Example:
~iworx/bin/import.pex --archive /tmpbackup/mywebsite.com-partial-01-02-2022.tgz --control-panel siteworx --ipv4 123.45.678 --master-domain new.com