/ Migrations / Running migrations
Docs/Migrations/Running migrations

Running migrations

What happens after you press Start, and how to control a migration while it runs.

Lifecycle

created ──start──▶ queued ──▶ running ──▶ done        (one-time)
                                   │  ▲
                              pause│  │resume                  (live sync)
                                   ▼  │
                                  paused
running / queued / paused ──stop──▶ stopped
any active state ──retries exhausted──▶ failed

See Statuses for what each state means.

Starting a migration

A migration can start once it has a schema mapping. When you start it, NoSQLSync checks your plan's monthly data allowance and, for live sync, your number of live channels, then queues a job. Starting a migration that is already queued or running returns 409 Conflict.

The initial copy reads the source in batches and writes them to the target. Progress, throughput and logs stream to the migration's detail page in real time.

Controls

ActionApplies toEffect
PauseLive sync and dual-writeStops applying changes but keeps the change-feed position. Changes made while paused are applied on resume (subject to the source's retention window).
ResumePaused migrationsContinues from the saved position.
StopAny active migrationCancels the job. Rows already written stay in the target. Starting again re-runs the copy; upserts make this safe.
CutoverRunning dual-write migrationsReverses the sync direction
i

One-time copies can be stopped but not paused.

Retries and failures

Transient errors — a dropped connection, a target that briefly refuses writes — are retried automatically with exponential back-off:

JobAttemptsFirst back-off
One-time copy35 seconds
Live sync510 seconds

Inside a live sync, a lost change-feed connection reconnects indefinitely (backing off up to 30 seconds between attempts). A single change event that keeps failing is retried three times, then skipped and reported as a cdc.error with reason dead_letter so one bad document can't block the stream.

When retries run out, the migration moves to failed, sends a migration.failed webhook and an in-app notification. Fix the cause and start it again.

Stalled jobs

Workers send a heartbeat while a job runs. If a migration is marked running but its worker has disappeared and no heartbeat has arrived for two minutes, NoSQLSync marks it failed so it never sits in a misleading state.

Logs and metrics

  • The detail page shows a live log stream. Over the API, GET /migrations/:id/logs is a Server-Sent Events stream.
  • GET /migrations/:id/metrics returns throughput and, for live sync, replication lag.
  • Logs are kept for 7 days by default. Admins can change retention to 30, 90 or 365 days in Settings → General (the Free plan keeps at most 30).

Data allowance

Each plan includes a monthly volume of data moved. The check happens when a migration starts — a run already in progress is never cut off midway. See Plans & limits.