Shared server guidance · Question & answer

How do I keep database data consistent during a server migration?

Choose a database-supported migration method and define which system may accept writes at each stage. A copied directory or imported dump is not automatically current when the source remains active. Version compatibility, transaction position and the final writer change all need explicit checks.

AdvancedLinux and Windows dedicated servers and VPSs; planning guidance
Go to the answer

Before you start

  • Database engine and version details, an application dependency map and authorised database administration.

Instructions

1. Select a supported method

Evaluate logical export/import, a supported physical method or replication for the exact source and target versions. Check extensions, collations, roles, permissions and database features. PostgreSQL major-version moves, for example, require supported upgrade or migration procedures; copying an old data directory into a new major version is not a general solution.

2. Control the final writes

Document when new writes stop or switch, how background jobs are handled and how outstanding transactions are completed. If replication is used, define the evidence that the target has caught up and the method that prevents the old primary from continuing as an independent writer.

3. Validate before reopening traffic

Check database recovery, required objects, privileges and representative business records. Start the application against the intended endpoint and test a safe transaction. Record the exact cutover point and decide how any post-cutover writes would be reconciled if the migration has to be reversed.

Check the result

  • The target contains the agreed final source state and only the intended writer is active.
  • Application reads and controlled transactions pass the acceptance checks.

Troubleshooting

Both old and new databases received writes
Pause the affected write path and obtain a database-specific reconciliation plan. Changing DNS back alone does not merge divergent transactions.

Official references

Use the documentation for your installed version when a flag, service name or platform feature differs.