Installation


Upgrades


DTC-Xen Installation


DTC-Xen / Dom0 Howtos

DTC-Xen / DomU Howtos

FAQ


DTC Howtos


Manuals


Features


Roadmap


Devel docs


Wiki - i18n


Wiki - Meta


Server to server automated migrations

1. Content

DTC has 3 scripts to migrate your domains and its attached configuration (eg: ftp, email, subdomains, lists, etc.). It is possible to migrate from only a domain, a user and all its domains, or a full DTC server setup to another server. This howto covers these 3 modes.

2. Generalities about the migration scripts

2.1. SSH keys for root

If migrating from server A to B, all scripts assume that you have setup ssh root key logins without passwords. So in server A, you should create a key for root:

   ssh-keygen -t rsa

I would suggest to not enter a passphrase (eg: empty password).

Then copy /root/.ssh/id_rsa.pub from server A in /root/.ssh/authorized_keys2 in server B. You can then try to ssh root@server-b, it shouldn't prompt for a password.

2.2. Shutdown the dtc-dos-firewall and dtc-xen-firewall

It is also recommended to shutdown both dtc-dos-firewall and dtc-xen before starting any of the 3 migration scripts.

2.3. Location of scripts

All the scripts are in:

   cd /usr/share/dtc/admin

Each times a migration script is started, not only the configuration is migrated, but also all hosted files (eg: the mail store and the web spaces).

3. Migrating a domain

   /usr/share/dtc/admin/domain_migrate.sh <destination-host> <domain> <destination-admin>

will migrate <domain> stored in the local server to <destination-host>, and the domain will be attached to <destination-admin>. This admin must exist.

4. Migrating a username and its contained domains

   /usr/share/dtc/admin/user_migrate.sh <destination-host> <username>

Migrates <username>, all its files, databases and domain configuration to <destination-host>.

5. Migrating a full DTC server instance to another server

   /usr/share/dtc/admin/dtc_migrate [-d] <DESTINATION_SERVER>

will migrate all the content and configuration of localhost to <DESTINATION_SERVER>. Adding the -d parameter will delete files from <DESTINATION_SERVER> if they vanished from localhost (useful if you want to launch the script multiple times to sync data before shutting down localhost). NOTE: You must have rsync installed on both systems.

If you run a dtc_migrate, you will get an "Cannot connect to database !!!" error when trying to connect to your control panel on the new server; as the passwords in the old system may not have be used to setup the new server. This can be corrected by:

Editing this page means accepting its license.

Page last modified on July 10, 2013, at 09:55 PM EST