berth

Migration

Migrating a server

Step by step from connecting to the old server to the two-phase cutover with ARP/NDP check, test mode and Open, with the panel path and the CLI command for each step, and the way back.

Updated 11 min readmigration · cutover · plesk · ip takeover · rollback · runbookView as Markdown

On this page
  1. Before you start
  2. 1. Connect to the old server
  3. 2. Review the inventory
  4. 3. Map the IP addresses
  5. 4. Measure the size
  6. 5. Turn on source watch (recommended)
  7. 6. Import and synchronise
  8. 7. Check and rehearse
  9. 8. The cutover window
  10. 9. The way back
  11. 10. The log
  12. 11. Afterwards
  13. Command summary

This is the full procedure for moving a running Plesk, cPanel, DirectAdmin or Berth server to Berth with the migration console. Plesk is the example; the other sources work the same way. Every step is shown both in the panel and on the command line. For the background (what carries over, why the old server is never changed), read Moving to Berth first.

The short version: you copy everything in advance while the old server keeps running. In the maintenance window you do the final sync (phase 1), take the old server off the network, and Berth takes over its addresses and activates everything (phase 2).

Before you start

  • Install Berth on the new server (Installing Berth) with the PHP versions your customers use.
  • Make sure the new server can reach the old one over SSH, ideally over your VPN.
  • Decide per IP address of the old server whether it moves along (both servers at the same provider or on the same virtualisation host, so an address can move) or whether domains get new addresses and DNS changes.
Addresses move alongNew addresses, DNS changes
DNSunchangedchanges (automatic for domains at a connected DNS provider)
Cutoverin two phases, all accounts on those addresses togetherper account or per group, whenever it suits
Interruptionthe window itself, usually 30 to 90 minutesuntil DNS has changed everywhere; the old server keeps answering meanwhile

1. Connect to the old server

In the panel: Admin → Migration → New migration.

  1. Enter a name, the address and the SSH port of the old server.
  2. Check the host key. Compare the fingerprint shown with the one on the old server (ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub). Berth remembers it.
  3. Choose how to connect: the root password once (not stored), a script you paste on the old server as root, or a key that is already there. Berth installs read-only access with a forced command; nothing else changes on the source.
  4. Berth detects the panel, its version and the number of accounts. Confirm with Confirm and read inventory.
berth migration add --name plesk1 --host old.example.nl --password-stdin   # shows the fingerprints
berth migration add --name plesk1 --host old.example.nl --kind plesk \
  --fingerprint SHA256:… --password-stdin < /root/source-root-pw
berth migration list
berth migration show --id 1

Without --password-stdin (and still with --fingerprint), the command prints the script to run as root on the old server yourself instead; --key <name> uses a key pair that is already on the source (stored under /etc/berth/migrate).

2. Review the inventory

The Accounts card lists every subscription with what exists and what cannot be migrated yet, with the reason (for example a PHP version that is not installed here). Click an account for the card What carries over: per part (domains, websites, mail, databases, FTP, cron) the number and size on the source, its state and the reason in one sentence. The filter With a cross shows only accounts where something is wrong.

The card Limits shows the Plesk plans and subscription limits next to the packages they become here.

3. Map the IP addresses

On the IP addresses card, choose per address of the old server: the default address here, another address of this server, or moves along (taken over at the cutover).

berth migration ips --id 1 --map 203.0.113.10=takeover --map 2001:db8::10=takeover
berth migration ips --id 1 --map 203.0.113.11=198.51.100.5

4. Measure the size

Measure size sets the space needed against the free space here (MariaDB and PostgreSQL separately) and estimates how long the first import will take, as a range such as "about 2.3 hours (between 1.2 and 4.7 hours)". The estimate becomes more accurate after each real import from that server.

berth migration run --id 1 --kind estimate --wait

An import or sync reads from the old server for hours while its sites are live. Source watch measures, every minute, how fast a few of the source's sites respond over HTTPS, directly at the source's address. It changes nothing on the source and needs no extra access. When responses slow down, the task slows down step by step: an rsync bandwidth limit, databases one at a time, pauses between parts. If it stays slow at the lowest pace, the task pauses at a safe point (before the next account, webspace, mail domain or database, never halfway through one) and resumes by itself once the sites are back to normal.

It is off by default and applies from the next task. The card shows the response time, the baseline, the threshold and the current pace with a small chart.

berth migration watch --id 1 --on
berth migration watch --id 1 --domains acme.nl,shop.example.com=203.0.113.10
berth migration pause --id 1
berth migration resume --id 1

During the final sync and the cutover the sites on the source are already down, so the task then never pauses; it only slows down and warns.

6. Import and synchronise

Migrate copies every account. The old server keeps running; accounts here wait (no cron, no customer mail, inbound mail temporarily refused with 450). Synchronise brings everything up to date again; repeat it as often as you like, for example every night. Synchronise: only a part syncs only files, mail or databases, and sets how many databases are dumped at the same time (2 by default, up to 8).

berth migration run --id 1 --kind import --wait
berth migration run --id 1 --kind sync --wait
berth migration run --id 1 --kind sync --databases --db-parallel 4 --wait
berth migration run --id 1 --kind sync --accounts acme,shop_example_com --mail --wait

With Plesk, each sync also picks up what the customer created on the old server after the import, and settings the customer changed there (PHP version, directives, preferred domain), as long as nobody changed them here. Anything removed on the source, or changed on both sides, appears under To do, with Remove here too… or berth migration remove-here.

7. Check and rehearse

  • Check compares the websites with the old server, mail per folder and the reception of every address. berth migration run --id 1 --kind check --wait.
  • Parity measures both servers side by side over the network; take a baseline well before the window. See Parity checks.
  • Rehearsal does everything the cutover does except switch, tells you what would block it, and measures how long the final sync takes. That is roughly how long sites will be down in the real window. berth migration run --id 1 --kind rehearse --wait.
  • Source identity: set the outbound mail address and HELO name, the old server's host names and their certificates. The check reports whether PTR, HELO and SPF are in order. berth migration identity --id 1, berth migration names --id 1.

berth migration cutover --id 1 check lists what is still open before the cutover. Tell your customers about the window two weeks in advance, and pick a weeknight.

8. The cutover window

Close the old server to customers before phase 1, for example with the firewall of the virtualisation host, so nothing changes after the final sync. Then open the card Two-phase cutover.

Phase 1: the final sync

Choose Start phase 1 and set:

  • Accounts: by default every migrated account. Everything on an address that moves goes together; Berth refuses a selection that leaves out an account on such an address.
  • Test mode (recommended) with Allowed sources: your own IP, a measuring host, your VPN. After the takeover only those reach the addresses until you choose Open. Everyone else gets a TCP reset, so mail servers retry later and nothing from customers arrives yet.
  • Host steps for the pause: what you will do outside Berth.
  • Phase 1 stays valid for phase 2: 120 minutes by default. If phase 1 is older at Go, you resume it first.

Phase 1 runs the sync with table locks, the settings and new databases, and compares the mail folder by folder with the old server. An account turns green only when everything matches. If phase 1 fails for an account, fix it and choose Resume; only what is not green runs again.

berth migration cutover --id 1 start --test-mode --allow 198.51.100.7 \
  --host-step "unplug old NIC on the host" --note "window 4 Nov" --wait

The pause: actions on the host

Phase 1 is green and nothing has been switched. Now, outside Berth:

  1. Take the old server off the network for the addresses that move: disconnect its network interface on the virtualisation host, or remove the addresses there. The old server itself stays as it is, for the way back.
  2. For a routed address (a failover or movable IP), switch it to the new server at the provider.
  3. Choose Check addresses. Berth checks on the network, with ARP for IPv4 and NDP for IPv6, whether anyone still answers. A firewall on the old server cannot hide an address from this check. Every address must be free.
berth migration log --id 1 --step W8 --text "old server disconnected"
berth migration cutover --id 1 check

Go / no-go

  • No-go: call off: nothing has been switched. Reconnect the old server and plan a new date. berth migration cutover --id 1 no-go.
  • Go: phase 2: phase 2 starts. berth migration cutover --id 1 go --wait.

Phase 2: addresses and activation

Berth checks the addresses once more and stops before anything changes if one is still taken. Otherwise:

  1. The addresses go onto the network interface; IPv6 with duplicate address detection.
  2. The router is told right away (gratuitous ARP for IPv4, an unsolicited neighbour advertisement for IPv6), so traffic finds the new server right away instead of after several minutes.
  3. Test mode switches on, if chosen.
  4. All accounts are activated: domains on the addresses, mail delivered here, cron on, certificates requested, a final check per account.

If phase 2 is interrupted (a reboot, an error on one account), choose Resume: every step can be repeated, and accounts that are already over stay over.

Checks and Open

From an allowed source, check websites, receiving and sending mail, certificates, FTP and webmail. Test mode applies only to the taken-over addresses; the server itself always gets through. A reboot during the checks restores test mode within a minute, and berth doctor warns if it is left on after the cutover.

When everything is right, choose Open: test mode goes off and customers are on Berth.

berth migration cutover --id 1 open --note "all checked"
berth migration cutover --id 1          # where the cutover stands

Test mode can also be set separately: berth migration cutover --id 1 testmode --allow 198.51.100.0/24, or --off.

9. The way back

Until you choose Open, going back is free: customers have written nothing here yet.

  1. Back to the old server, or berth migration cutover --id 1 rollback --wait. The accounts go back into the waiting state and the addresses leave this server's interface.
  2. Give the addresses back to the old server: first release them here, then connect the old server, otherwise IPv6 sees the address twice and does not use it.
  3. Open the old server to customers again.

For a selection of accounts, the Accounts card has Rollback under Actions for the selected accounts; on the CLI, berth migration run --id 1 --kind rollback --accounts acme --wait.

After Open you can still go back, but what customers did here in the meantime (mail, uploads, orders) stays only here. Berth can then relay mail for those domains to the old server and send mail that already arrived here back over SMTP. Sent items, drafts, trash and spam are not sent back; count first:

berth migration relay --id 1 --on
berth migration mail-return --id 1 --since "2026-11-04 02:45" --dry-run

10. The log

Cutover log shows every step with the time since the start, how long it took, its outcome and who did it: phases, each account, the address check, the takeover, test mode, each go/no-go, and what you ticked off yourself. Download it as CSV for a report or your own runbook.

berth migration log --id 1
berth migration log --id 1 --csv > cutover.csv

11. Afterwards

  • The Post-check card checks websites against the old server, reception of every mail address and where DNS points, with a list to tick off.
  • Source mail queue: messages still queued on the old server when it was disconnected will not be sent by it. Berth counts them read-only; berth migration queue --id 1 --watch 30s repeats the count during the window.
  • Run a parity check in after mode.
  • Remove the migration under Danger zone when done. That removes the migration and its access key here; then also remove the key and the read-only helper on the old server.

Command summary

WhatPanelCommand
StatusTwo-phase cutoverberth migration cutover --id N
Phase 1Start phase 1… start [--accounts a,b] [--test-mode --allow …] [--host-step …] --wait
Check addressesCheck addresses… check
Go / no-goGo: phase 2 / No-go: call off… go --wait / … no-go
ResumeResume… resume --wait
Test modeTest mode on… testmode --allow … / … testmode --off
OpenOpen… open
Way backBack to the old server… rollback --wait
New cutover after open or backClear cutover… reset
LogCutover logberth migration log --id N [--csv]

The same operations exist in the REST API under /api/v1/migrations/{id}, and the AI integration can read the state, the address check and the log.