Export a domain to a file
The move cut in two: export writes a domain to one
file, and import, days later and on another server if you like, puts it
into an account. Each half needs the approval of its own account only.
elpan-migrate export control.example.com shop.zip
elpan-migrate import shop.zip control.example.net
elpan-migrate activate shop.zip control.example.net
The file holds the same as a live move: the domain's configuration and
credentials, the mail of every mailbox, calendars and contacts, webmail
data, list archives, and the folders and databases you choose on the
approval page,
whose Receiver reads a file (shop.zip).
Export
export reads the domain and fetches everything through the machine the
tool runs on, into a zip file. The domain keeps working while it does: the
file is a copy, not a move. Each mailbox and each database is consistent in
itself, but they're not all taken at the same moment, and mail that arrives
after the export stays in the account it arrived in.
The approval ends when the export does; --keep-approval keeps it.
The machine needs room for the largest mailbox or folder at a time, beside
the file itself (--temp names where), and the programs listed in
The elpan-migrate tool. An export that
stops leaves no file behind: run it again, from the start.
The passphrase
export asks for a passphrase, twice. It encrypts the credentials in the
file: the mailboxes' password hashes, authenticator secrets, backup codes,
app passwords and passkeys, private keys, client secrets and tokens. The
passphrase is yours to choose and to remember: the panel never sees it, and
nobody can recover it for you. import asks for it again.
Only the credentials are encrypted. The mail, the files and the databases are in the file as they are. The tool writes it readable by you alone; keep it that way, and delete it once it's imported.
Someone who has the file can try passphrases on it at their leisure; the encryption makes each try slow on purpose, but a short or common passphrase still falls.
An empty passphrase writes the credentials unencrypted, after a warning. Choose it only for a file that never leaves a disk you trust.
A lost passphrase loses the credentials and nothing else:
elpan-migrate import --without-credentials shop.zip control.example.net
imports everything else. Every mailbox then gets a setup link, your email users set up their second factors and app passwords again, and the certificates are ordered anew.
For scripts, the tool reads the passphrase from the environment variable
ELPAN_MIGRATE_PASSPHRASE instead of asking; set to an empty value, it's
an empty passphrase.
Import
import follows the rules for adding a domain,
under the approval of the receiving account:
- It checks the whole file before it writes anything: a file that was changed, or holds anything out of place, is refused. Then it asks for the passphrase; a wrong one is refused.
- It prints a TXT record,
_elpan-verify.example.com. Publish it where the domain's DNS is now, at the old server or your DNS host. The tool waits until the receiving server sees it. - It makes an inactive copy of the domain, and fills it from the file: configuration, credentials, mail, folders, databases.
The copy stays inactive until you activate it, with activate or with
Activate on the Domains page. The approval ends once every domain
of the file is active. The databases get the receiving account's names, as
in a live move.
import can be run again: it goes on where it stopped and copies what
isn't there yet.
A server that has the domain in another account refuses the import: a file can't prove that its owner gave the domain away. Between two accounts of one server, move the domain live instead.
The DNS afterwards
| The zone was at | Once the copy is active |
|---|---|
| Cloudflare, deSEC or another PowerDNS | The copy publishes its records there, with the token from the file. The addresses change, the name servers don't. |
| Your own DNS host | Change the records to the new server's: the panel's DNS page lists them. |
| The exporting server itself | Change the name servers at the registrar to the new server's; the activation prints them. Nothing answers for the domain at the new server until then. |
An export of a zone the exporting server signed with DNSSEC is signed by the new server with keys of its own: have the old DS record removed at the registrar before you change the name servers, and give it the new one after.
The exporting server isn't part of an import. The domain stays there as it was: remove it in the old account once the new one works, after the DNS points away from it.