Move a domain to another server
A move to an account on another Elpan server is the same move, with the same commands and approvals. Name both panels, the giving one first:
elpan-migrate plan control.example.com control.example.net
elpan-migrate prepare control.example.com control.example.net
elpan-migrate sync control.example.com control.example.net
elpan-migrate switch control.example.com control.example.net
Two things differ. The receiving server doesn't know the domain, so it needs a proof that you control it before it makes the copy. And the domain's DNS has to point at the new server after the switch, which sometimes needs you at the registrar.
The proof
prepare asks the receiving panel for a token and publishes it, through
the giving panel, as a TXT record _elpan-verify.example.com in the
domain's zone. Once the receiving server sees it in the DNS, it makes the
inactive copy, and the tool removes the record again. The record is
temporary in any case: it goes away by itself after a day.
Where you manage the zone's records by hand, the tool prints the record and waits: add it at your DNS host, and the tool goes on once it's visible.
The receiving account's owner gets a notice in their system mailbox that a copy of the domain is ready for a move, and the copy shows on their Domains page with an Activate button they won't need unless the move stops half-way (below).
A receiving server that has the domain in another account refuses the proof: there, the domain moves between accounts of that server.
The copies go server to server
Mail and files go from one server straight to the other: the receiving server signs in to the giving server over SSH, with a key the tool lends it for the run. The receiving server has to reach the giving server's SSH port. If it can't, the copy fails and names the host and port; ask the giving server's provider to let the receiving server in. The machine the tool runs on needs to reach both panels and the receiving server's SSH port.
The DNS at the switch
At the switch, after the last copy, the giving copy is handed over: it stays unavailable for good, with no lease to make it active again. Then the receiving copy is activated. What happens to the DNS depends on where the zone is published:
| The zone is at | At the switch | Afterwards |
|---|---|---|
| Cloudflare, deSEC or another PowerDNS | The receiving copy has the same provider and token. Once active, it writes its records there: the addresses change, the name servers don't. | Nothing. |
| Your own DNS host (records by hand) | The switch prints the new records, and the receiving panel's DNS page lists them. Change them at your DNS host. | Nothing. |
| The giving server itself | The giving server's name servers answer with a copy of the new server's records, a stand-in. | Change the name servers at the registrar, below. |
For up to the records' TTL (30 minutes by default) some senders and visitors still use the old addresses and reach the giving server. Mail there gets "retry later" and arrives at the new server on the next try; visitors see the maintenance page.
The certificates moved with the domain, so the new server answers HTTPS from the first request. It renews them itself from then on.
A domain whose DNS this server hosts
When the giving server hosts the domain's DNS (built-in DNS, the default), the registrar sends everybody to the giving server's name servers, and only you can change that.
Before the move: turn DNSSEC off
Zones hosted here are signed with DNSSEC by default, and the signing keys
can't move to the other server. plan refuses a signed zone, so first:
- Have the DS records removed at the registrar.
- Wait until they have expired from caches, often a day.
- Set DNSSEC Status to off on the zone service's General tab in the giving panel (see DNSSEC).
The receiving copy is unsigned too. Once the registrar points at the new server, you can turn DNSSEC on there and give the registrar its new DS record.
While the registrar still has a DS record, every resolver that validates DNSSEC refuses an unsigned zone, and the domain stops resolving for them. Remove the DS records and wait for them to expire before you turn signing off.
At the switch: the stand-in
After the hand-over and the activation, the switch publishes the stand-in at the giving server: the receiving copy's records, answered by the giving server's name servers (keeping their own NS and SOA records). Mail and visitors reach the new server while the registrar still names the old one. The switch prints the receiving server's name servers.
Change the domain's name servers at the registrar to those. Then keep the stand-in current:
elpan-migrate watch control.example.com control.example.net
watch copies the receiving copy's records to the stand-in whenever they
change, so a record you add at the new server is answered at the old one
too. It stops by itself once the registrar names the new server's name
servers. It runs in the foreground; stopped, it goes on when you run it
again.
The approvals last seven days. When the registrar takes longer, watch
stops before they end and says so; run it again and approve the giving side
anew. The giving page then lists the domain for the stand-in only,
which lets the tool keep the stand-in current and nothing else.
After the registrar change
Both panels show where it stands, on the domain's pages. The new server says which name servers to set and what the registrar names now, and then that the old server's copy is no longer needed. The old server says that its name servers answer with a stand-in, and whether the registrar still sends resolvers there.
Removing the giving copy removes the stand-in, and the domain stops resolving for everybody the registrar still sends to the old server. Remove it a day or two after the registrar names the new server, once resolvers have forgotten the old name servers. The removal page warns you while the stand-in is still needed.
If the move stops half-way
The hand-over and the activation are two steps on two servers. A run that
stops between them leaves the domain unavailable on both, which loses
nothing: mail is retried, visitors see the maintenance page. Run switch
again, and it only does the activation.
Without the tool, either owner can end it on their Domains page:
- the receiving owner selects Activate on the inactive copy, when the move is finished and only the activation is missing;
- the giving owner selects Make available again on the copy handed over, when the move didn't finish.
If both copies are active, both servers take mail for the domain and write its DNS over each other. Each button warns about it; use one, on the side that should have the domain.
abort works until the hand-over. After it, the way back is back.
Move it back
back works across servers too: the original server proves the domain
again (the tool publishes the record through the server that has it now),
takes up its own handed-over copy again, and the new server hands its copy
over. For a domain whose DNS a server hosts, the new server's copy stands in
until you change the name servers back at the registrar; back --watch
keeps it current.
The giving owner is told by a notice in their system mailbox when the domain is handed over.