Migrate an application between VPS without losing data: plan and rollback

Published on 2026-11-14 by frfrand

Inventory, transfer, synchronization, DNS and secure incident recovery.

Migrate an application between VPS without losing data: plan and rollback

A failed migration is usually a state problem

Copying code to another VPS is simple compared to moving databases, uploaded files, queues, emails, and scheduled tasks without losing writes. The first decision is how much maintenance time the business accepts and what data loss would be tolerable. Define a realistic RPO and RTO before touching DNS.

Inventory before changing anything

Note domains, DNS records, runtime version, private variables, ports, systemd services or containers, TLS certificates, jobs, external dependencies, storage, and data volume. Locate upload paths and services that write outside the database: incomplete backups and exports are a frequent cause of loss.

Prepare the destination

Install and configure the new server with non-privileged users, firewall, hardened SSH, monitoring, proxy, runtimes, and compatible dependencies. Copy immutable code artifacts from a known commit. Before switching traffic, check services locally with test domains or controlled resolution, without interfering with the public domain.

Database: choose a method according to size and window

For small databases, a consistent logical backup and a tested restoration may be sufficient if you suspend writes during the cutover. For systems that cannot be stopped, evaluate replication or a continuous synchronization strategy, checking version compatibility and engine mechanisms.

Do not assume that pg_dump creates a replica that continues updating: it is a logical snapshot. Verify extensions, roles, owners, sequences, external jobs, and permissions after restoration. A backup is only useful if you can restore it and validate the data.

Files and background tasks

Synchronize uploads using mechanisms that preserve permissions and allow repeating copies. A second synchronization after stopping writes helps capture final changes. Freeze cron and workers on one side to avoid double billing, duplicate emails, or concurrent execution of non-idempotent processes.

Cutover and DNS

Reduce the TTL in advance when you control the zone, but remember that some resolvers and clients may retain records. Keep the previous server available during the transition according to your plan. Validate TLS, webhooks, redirects, email sending, DNS, and critical flows from the outside. Do not interpret that the first successful curl represents all users.

Rollback that protects information

Before the cutover, establish who decides to roll back, with what signals, and how new writes made at the destination will be handled. Pointing DNS without reconciling data can lose new reservations or orders. In complex incidents, temporarily stopping operations may be safer than forcing a return.

After migrating

Monitor errors, latency, queues, sends, storage, and consistency. Keep the source accessible but protected during the agreed window. Only cancel it after validating the copies and operation.

More context in Docker migration from Coolify and Next.js deployment on VPS. ArduMaker VPS and GitHub deployments can participate in the transition, but the data plan and rollback depend on each application.

Frequently asked questions

### Does lowering the TTL guarantee instant migration? No: it reduces part of the cache time, but does not control all clients. ### What data is most often forgotten? Uploads, queues, tasks, secrets, webhooks, and email configuration. ### Can I migrate without downtime? Sometimes, with carefully designed replication and synchronization; it is not an automatic property.

  • VPS
  • migración
  • PostgreSQL
  • DNS
  • backups

On ArduMaker

  • PostgreSQL: Install PostgreSQL and manage databases, users and permissions without the command line.
  • Automatic backups: A full live backup every week, the last 2 kept, and a final copy when you delete the VPS.

Keep reading

All articles · VPS plans