Skip to main content

Move your account to another server

Everything in your account moves into an account on another Elpan server, or into another account on this one: every domain, the whole home directory, every database, and what belongs to the account rather than to a domain. The tool is elpan-migrate, the one that moves a domain, with its account commands. Every domain moves the way a single domain does, with the same downtime at the switch; this page covers what a whole account adds.

What goes​

WhatHow
Every domainAs a domain move, with its mailboxes, mail, websites, records and certificates.
The home directory, all of itFiles, hidden files and the folders outside every website, with their owners, permissions and ACLs.
Every databaseUnder a new name if the account's name changes.
App servers, containers and stacksTheir settings, and the containers' named volumes with their files and owners. What was running is started on the receiving side at the switch.
Allow/Deny Lists, webhooks with their signing secretsCreated in the receiving account.
The Task Scheduler crontabInstalled at the switch, below the receiving account's own lines.
The System MailboxIts messages merged into the receiving account's own.

What doesn't go​

WhatWhy
The account's own sign-in: password, second step, passkeysThe receiving account has its own.
API keys and connected appsTheir address changes with the server. Make new ones there.
History: Account Activity, mail logs, bounce history, AI conversations, webhook deliveriesIt stays with the old account.
Backups and site logsThe receiving server starts a new history.
SSH keys~/.ssh/authorized_keys is never written over. sync lists your keys; add those you want on the receiving SSH page.
A webhook's limit to certain hostnamesNot carried yet; the endpoint arrives without it.
Container imagesPulled again from their registries. An image you built on the old server isn't there: build it again before the switch.
Limits, status and IP addressesYour provider sets them for the receiving account.

plan lists all of these before anything is changed.

The receiving account​

Your provider creates it: an account owner can't create an account. Its name is usually not yours; see Another account name. It needs room for everything that comes: its domain limit for every domain, its storage for the home, the mail and the databases, its limits of mailing lists and webhooks, and persistent services if you have app servers or containers. plan checks all of them and says which one is short.

It can be empty, or have files and domains of its own. Nothing it has is overwritten:

  • A folder both homes have, such as public, is entered and the new files are added inside it; the folder keeps its own permissions.
  • A hidden file both have, such as .bashrc or a file under .config, stays as the receiving account has it; plan names each one.
  • Any other file both have is a collision: plan lists them and the move doesn't start. Rename or remove one side's, or tick the folder that holds it under Replace what this account has already on the receiving approval, and the giving one replaces it.
  • A database name both have is handled as on a domain move.

What the receiving account adds between two runs of sync is its own, and no later copy touches it.

Approve it​

The approvals are those of a domain move (Approve a move), with one tick on each side:

  • Give everything in this account on the giving page. The domains, folders and databases below it are then not needed: the approval covers every domain, the whole home, every database and the account's own things, their secrets included. It also allows the tool to hold the account for the last copy.
  • Receive a whole account on the receiving page. The tool may then write into the home where nothing exists, and create app servers, containers, stacks, Allow/Deny List entries, webhooks and the crontab.

The account commands refuse other approvals: run elpan-migrate forget and approve again.

The steps​

Name the giving panel, then the receiving one; on one server, name the panel once.

elpan-migrate account plan control.example.com control.example.net
elpan-migrate account prepare control.example.com control.example.net
elpan-migrate account sync control.example.com control.example.net
elpan-migrate account switch control.example.com control.example.net
CommandWhat it does
account planEvery domain's plan, the account's own things, the collisions, the room in the receiving account, the cron lines that name the old account, and what isn't carried. Changes nothing.
account prepareEvery domain's inactive copy, the app servers, Allow/Deny List entries and webhooks, and the crontab, kept aside until the switch.
account syncThe whole home, the container volumes, the System Mailbox and every domain's content, while everything keeps working. Run it as often as you like.
account switchHolds the giving account, makes every domain unavailable, copies once more, hands every domain over, installs the crontab, and starts the containers, stacks and app servers that were running.
account abortBefore the hand-over: releases the giving account and makes its domains active again. The receiving account keeps the inactive copies and what prepare made.
account statusWhere the move and each domain stand, and whether the giving account is held.
account backAfter the switch, every domain back as back does, then the giving account released. What was written in the receiving home since the switch isn't carried back.
account releaseReleases the giving account's hold.

The giving account needs at least one domain: the tool refuses an approval that gives none.

During the switch​

The giving account is held: nothing runs as it and nobody signs in to it, so its files hold still for the last copy. The domains are unavailable as in a domain switch. Stopped half-way, the hold and the domains' leases run out by themselves within half an hour; run account switch again to finish, or account abort.

After the switch​

The giving account stays held, with its domains as inactive copies, until you release it. Nothing is deleted there. Ask your old provider to close it once the receiving account works.

Releasing the old account starts it again

account release, or Release the hold in the old panel, starts its scheduled tasks, containers and app servers again: they then run on both servers, e.g. a cron job that sends mail sends it twice. Release it only to use the old account again, or to remove its files yourself.

Another account name​

The receiving account's name is usually not the giving one's, so what contains the name changes:

  • Databases are renamed, acme_shop to newacme_shop, with the login newacme_shop and the host newacme_shop.db.internal. The password stays.
  • The home moves from /home/acme to /home/newacme.
  • Application settings the tool recognizes are rewritten at every copy: WordPress wp-config.php, .env, Joomla configuration.php, Drupal settings.php, Nextcloud config/config.php, Magento app/etc/env.php and PrestaShop app/config/parameters.php. Only a value that is exactly the old database name, login, host or home path changes.
  • Other text files that still name one of them are listed by sync, for you to change by hand.
  • Cron lines that name the old home or a database are installed as they are, and plan lists them. Change them in Task Scheduler after the switch.

Through a file​

An account goes into a file with export and comes out of it with import, each in its own run and under its own approval, as a domain export does:

elpan-migrate export --still control.example.com acme.zip
elpan-migrate import acme.zip control.example.net
elpan-migrate activate acme.zip control.example.net

Under an approval for everything in the account, export writes the whole account: the domains, the home, the container volumes, the System Mailbox, the account's own things and the crontab. The account keeps working, so the file is a copy and not a move. --still holds the account while the file is written, so that nothing running as it changes its files during the copy, and releases it at the end; its domains stay active.

import needs Receive a whole account on the receiving approval, and keeps what that account has, as a live move does. The domains stay inactive and the crontab aside until activate, which also starts what was running. Until activate, the receiving account keeps a second copy of the home in ~/.local/state/elpan-transfer/, so that a repeated import sends only what changed; it counts against the storage until then.