Skip to content

Rollback plan for a failed cPanel cutover

A cutover that goes sideways is recoverable only if the rollback was decided before the cutover. Here is the shape of the plan and the time boxes.

A cutover going sideways is not the problem. The problem is realizing at minute 45 that nobody wrote down what “rollback” means. The team starts inventing it under pressure, makes a wrong call, and ends up worse off than if they had stuck with the broken cutover. The fix is writing the rollback before the cutover and putting an explicit time box on each decision point.

What’s happening

A migration touches at least five subsystems: DNS, files, database, mail, and TLS. Each can be rolled back independently, and each has a different rollback cost. DNS rollback is cheap if TTL is low. Database rollback is expensive if writes have landed on the destination. Mail rollback is risky if forwarders are active. Without a written plan with thresholds, the team conflates “rollback the A record” with “rollback the database” and panics.

How to verify

Before declaring rollback, confirm the failure is real and persistent:

# is the destination actually down or just slow?
curl -w "%{http_code} %{time_total}\n" -o /dev/null https://example.com
# is the issue at the load balancer or the app?
journalctl -u cpsrvd --since "30 minutes ago"
tail -100 /usr/local/cpanel/logs/error_log
# how much production data was written to the destination?
mysql -uroot -e "SELECT MAX(updated_at) FROM <db>.<critical_table>;"

If the destination has accepted writes, a DNS rollback alone will fork the data — old writes on the source, new writes on the destination. Decide before rolling back DNS.

The fix

  1. Pre-write the rollback — for each subsystem, document: how to revert, time required, data loss risk. Sign off on the document before cutover.
  2. Set time boxes — at T+15 minutes, decide: is the destination healthy? At T+60, decide: are we keeping it? Past T+120 with destination accepting writes, rollback gets exponentially harder.
  3. DNS rollback — revert A and MX to the source IPs. With a 300-second TTL set 48 hours before cutover, this propagates in ~5 minutes.
  4. Database rollback — if destination accepted writes, freeze the destination, dump new data, manually reconcile to source. Do not roll back the database without reconciliation, or recent writes vanish.
  5. Mail rollback — disable forwarders on the source, set Mail Routing back to Local, confirm exim -bt resolves locally. Any mail that landed on the destination during cutover stays there — copy back via imapsync.

The rollback should be rehearsed at least once in a staging cutover. Stack Harbor builds rollback plans as a deliverable inside migration solutions — book a migration review so the rollback exists before the cutover.