Docs apolopanel.com ↗ Start trial ↗
Documentation Server

Migration

The Migration tool moves hosting accounts from another server into APOLO with their websites, files, databases, mail, forwarders, cron jobs and DNS zones, keeping the passwords. It reads cPanel account backups, copies accounts straight from a cPanel/WHM server or from another APOLO server, imports an APOLO Full account backup, and imports ISPmanager accounts.

The Migration tool is a built-in addon: enable it under Addons (Enable), then it appears in the menu as Migration tool (administrators only).

The Migration tool asking which control panel you migrate from
Choose the source: a cPanel backup, a cPanel/WHM server, an APOLO server, an APOLO backup, or ISPmanager.

What moves

From the old serverIn APOLO
The accountA new account (or an existing one) with the same username and Linux password, and the package you choose
Main, addon and subdomainsWebsites, each in its own folder; a subdomain served from the same folder as another website becomes its alias. The old public_html becomes a link to the main website's folder, so code that names it keeps working
Parked domainsAliases of the main website, with their own www, mailboxes and forwarders
FilesEach website's document root in its folder; the rest of the home folder (code and settings outside the websites, the password files of protected folders) where it was, without the mail, the keys and the old panel's own folders. Nothing already in the account's home folder is overwritten
PHP versionThe same version per website as on the old server (MultiPHP Manager, the CloudLinux PHP Selector or .htaccess), or the nearest installed one
MariaDB/MySQL databasesEvery database of the account with the same names, and its users with the same passwords, so wp-config.php and other configuration files work without changes
MailboxesThe same addresses and passwords, the same size limits, and all the mail (mail apps don't download everything again)
Forwarders and catch-allForwarders, a mailbox that also forwards, and the catch-all
Cron jobsThe same jobs: the old PHP becomes php, and the old folders of the websites and of the home folder their new ones. A job that names a website's folder becomes that website's job, with its PHP version
DNS zonesInto APOLO's DNS (also into a zone that already exists)
CertificatesIssued again by APOLO once the domains point here

PHP websites are made with Apache behind Nginx by default, because websites from cPanel rely on .htaccess; you can switch any of them to Nginx later (Web servers). APOLO doesn't change a website's code: when the code or settings of a website name folders of the old server (another home folder, or a website's old folder), the report names the website, how many files do so and one of them, so you can change those paths. @reboot cron jobs aren't moved, and a job outside the websites runs with the default PHP. Not moved: mailing lists, calendars and contacts of the old webmail, WebDisk, traffic statistics, DNSSEC keys and the old panel's own settings and themes.

From a cPanel backup

  1. Make a full backup of the account on the old server: in cPanel, Backup → Download a Full Account Backup, or as root on WHM /scripts/pkgacct USER (it writes cpmove-USER.tar.gz).
  2. Copy the file to a folder on the APOLO server, for example with scp or SFTP to /root.
  3. In the Migration tool choose cPanel backup, enter the Folder on the server, Scan folder, choose the backup and Analyze backup. APOLO reads it without changing anything and shows what is in it.
  4. Review and import: the account (Create a new account with its username and package, or Use an existing account), the websites (their mail and DNS zone come with them), and the databases (every database of the account is migrated; you can leave one out).
  5. Start migration. It runs in the background with its progress and log; you can leave the page. Analysed backups are kept for 7 days, so you can continue without unpacking them again.

Each archive needs about its size free on the APOLO server while it is imported, and unpacking stops if it would leave less than 5% of the disk (at least 1 GB) free. Its databases keep the same room on the disk of the database server: a database is loaded only when that disk has its dump's size and that room free, and its load stops if less would stay free (the report then names the database). The archive is treated as untrusted input: nothing in it can reach outside the account, and its databases are loaded with the account's own database rights. The mail of a domain that belongs to another account on this server isn't migrated.

Straight from a cPanel/WHM server

For many accounts, or to keep the downtime short, APOLO can copy accounts from the old server itself:

  1. Choose Connect to the cPanel/WHM server: its Host name or IP address and SSH port, then how APOLO signs in. Either the Root password (used once, to add APOLO's own key to the server; it isn't saved) or add APOLO's SSH key yourself (the command is shown; the key works only from this server's address).
  2. Check the server's host key fingerprint (on the old server: ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub) and Trust and connect. APOLO checks it every time it connects.
  3. APOLO lists the accounts. Choose them and Copy accounts: they are packed on the old server and copied one at a time. On the old server APOLO only packs accounts and reads their files.
  4. When a copy is ready, review what to import and into which account, as for a backup.

The final sync

Right before pointing the domains to APOLO, run Final sync (Sync now) on a migrated account: what changed on the old server since the migration is copied. Changed and new files are copied and files removed there are removed here; each database is replaced by a fresh copy; each mailbox gets the server's messages. The rest of the home folder and the cron jobs aren't copied again. Then change the DNS at once.

From another APOLO server

An account moves from one APOLO server to another as it was there: the same username, its websites with their settings (type, PHP version and PHP settings, web server, caching, aliases and redirects), its databases and their users, mail domains with their spam settings and filters, mailboxes, forwarders, DNS zones, cron jobs and SSH keys, and every password (SFTP and SSH, the panel, databases, mailboxes). The DKIM key of each mail domain comes along, so its DKIM record stays valid. Two ways, as with cPanel:

From an APOLO backup

  1. Make a Full account backup: the account makes it in its panel under Backups (Full account backup), the administrator under Backups → Accounts (the account's backups), or as root on the old server apolo account export <account> (it writes apolo-backup-<account>-<date>.tar.gz in /root).
  2. Copy the file to a folder on the new APOLO server, for example with scp or SFTP to /root.
  3. In the Migration tool choose APOLO backup, Scan folder, choose the file and Analyze backup.
  4. Review: the account is made under its own username (an account of that name here is refused: delete it first), with the backup's package when this server has one of that name, its saved limits, or the package you choose. Choose the websites, databases, mail and DNS zones, and the PHP version of a website whose version isn't installed here. Start migration.

Straight from an APOLO server

The old server needs APOLO 1.8.5 or newer. Choose APOLO server and connect as for a cPanel/WHM server (the host name or IP address, SSH port, the root password once or APOLO's key, and the host key fingerprint). APOLO recognizes the APOLO server and lists its hosting accounts. Copy accounts: on the old server apolo account export packs each account's records and databases into a folder of its own, which is copied here and removed there; the home folder and the mail are copied with rsync, which resumes after a broken connection. Then review and import as for a backup. Final sync copies each website's document root, each mailbox and each MariaDB or MySQL database again.

An APOLO backup is untrusted input: its records only make things of that one new account, its password hashes go only to the database users and mailboxes the import made, and its files, dumps and mail are read inside the migration's work folder, never through a link. A domain that belongs to another account here keeps its mail, mailboxes, forwarders, DKIM key and DNS records; the report names what was left out. PHP settings above the server's limits keep the defaults, and the account's backup settings stay this server's. A file that has anything but folders and regular files outside the home folder isn't an APOLO backup and is refused.

From ISPmanager

ISPmanager has no full-account backup, so a small read-only script builds one on the old server; it changes nothing there.

  1. In the Migration tool choose ISPmanager and Download the script (or read it first).
  2. On the ISPmanager server, sign in as root and run it for the account. It writes apolo-ispmanager-<account>-<date>.tar.gz in /root and prints its full path.
  3. Copy the archive to a folder on the APOLO server, then pick it, analyse it, review and import as for a cPanel backup.

After the migration

  1. Test the websites before changing the DNS: point the domain to the new server in your computer's hosts file and open it.
  2. Run the Final sync for accounts copied from a server.
  3. Change the DNS: the A records of the websites and the MX records to the new server (or switch the nameservers, when APOLO runs the DNS).
  4. Certificates are issued by APOLO as soon as the domains point here.
  5. Mail: mail apps keep working with the same passwords once the DNS points here; check the domain's mail records (Deliverability).

The report of each migration says what moved, what didn't and why, and what is left to do. If a database didn't import completely (for example tables missing from the dump), the website works with what was imported; fix the cause in the dump and import it again into the same database.

If Postfix and Dovecot aren't installed yet, the mailboxes are made and their mail copied, but mail doesn't arrive and can't be read until the mail server is installed (Email).

Mail from another server over IMAP

To move only mail (for example from a hosted mail service), import it over IMAP into an existing mailbox: the old server's address, the mailbox's username and password, and APOLO copies every folder. See Importing mail.

Something missing or unclear? Ask support or report a bug.