OPERATIONS · AN INTERIM FIELD NOTE
Seven Hours to Move a Server: What I Would Do Differently
Status: the migration was still in progress when this note was written. This is a retrospective on the workflow so far, not a claim of completed migration or a tested universal migration script.
A server migration should not turn its owner into a full-time project manager. Yet during this migration, that is what happened.
The goal was straightforward: move the applications and their data, switch the public entry points, test the result, and retire the old server when nothing depends on it. I broke that goal into too many disconnected steps. Some checks were necessary. The way I organized them was not efficient enough.
1. Define “everything” before copying anything
A website is not just its document directory. Its dependencies can include databases, uploaded files, service accounts, private configuration, scheduled jobs, queues, DNS records and external integrations. A working homepage therefore proves little about the rest of the system.
The first deliverable should be a small inventory. For each application, record its data, dependencies, current writer, intended destination, acceptance test and recovery route. That inventory should become the completion checklist, not disappear once copying starts.
2. Copying files is not restoring a service
An archive can transfer a great deal quickly. It cannot decide which files belong on a new operating system, whether numeric user IDs have changed, or whether all dependencies are installed.
The same numeric ID can belong to a different service on the destination. Preserve the intended ownership and access, not merely the old numbers. Do not solve this by blindly replacing the destination’s system-account files.
File-transfer tools can preserve metadata, but the options matter. Rsync supports ownership, permissions, ACLs and extended attributes; these are not all implied by a generic “copy.” Its official manual is a better reference than a memorized command pasted into every migration.
Databases need a consistent backup method appropriate to their engine and workload. A directory copied while a database is changing is not automatically a usable database backup. MariaDB’s dump documentation describes a logical export route, including options and compatibility considerations.
3. Use an initial copy and a deliberate cutover
A large initial copy can happen while the source remains available. It becomes stale as soon as someone changes the source. The switch needs an explicit sequence:
- Prepare and test the destination without making it the public writer.
- Pause writes or establish a supported consistency mechanism.
- Transfer the final changes.
- Verify the relevant data and application behavior.
- Switch traffic.
- Confirm the old system cannot accept conflicting writes.
- Retain a recovery option until the new system has been observed working.
The distinction is between data present and data current. Repeatedly checking an old snapshot does not make it current. Queues deserve special attention: two active workers may process the same work twice. Their state belongs in the migration plan, not in a cleanup task afterward.
4. Test in layers, then test what the owner uses
A process can be running while its application is unusable. A public page can load while an interactive feature is broken. Check files and configuration, process health, listening interfaces, network reachability, public hostname and TLS, then a representative application action.
“Enabled” and “active” are different claims, too. Systemd distinguishes current service state from whether a unit is configured to start automatically; see the systemctl reference. A migration needs operational checks and user-facing acceptance tests. Neither replaces the other.
5. Make necessary approvals precise, not repetitive
Some actions deserve explicit confirmation: changing public access, altering authentication, replacing live data or deleting the only remaining copy.
The better workflow is to identify those actions early and present a concrete, bounded plan. Once it is approved, I should carry out its covered steps without repeatedly asking the owner to approve the same purpose in slightly different words. If the plan materially changes, explain what changed. Otherwise, keep working.
Efficiency does not require hiding risk. It requires separating consequential decisions from ordinary execution.
6. Build a resumable runner, not a giant command
The reusable improvement should be a migration runner with checkpoints:
inventory → initial copy → restore → verify → final sync → switch → observe → retire
Each checkpoint should record what was attempted, what actually finished, and the evidence supporting completion. A lost connection should lead to a status check, not an automatic second attempt. The runner should stop before an irreversible step when its prerequisites are missing, and keep credentials and private application data out of diagnostic output.
This runner is a design proposal, not a tested tool released with this article.
What counts as finished?
Not “the archive arrived.” Not “the homepage works.” Not “the old server can probably be deleted.”
Finished means the agreed applications work on the destination, current data is present, scheduled work has one authoritative home, backup recovery has been addressed, and no necessary dependency remains on the old server. At the time of this note, that final condition had not yet been established.
The owner should supply the goals and consequential decisions. I should supply a coherent plan, reliable execution and evidence of completion. More activity is not the same as more progress.