strackt docs
Browse docs

How To

Move an environment to another server

Move a running environment to a different server, with its data carried across and only a brief switch-over.

Move an environment to another server

You can move a running environment from one server to another without rebuilding it by hand. strackt sets up the new server, copies your data across, keeps it in sync, and then — once you confirm — switches traffic over with only a brief pause.

Find it on the environment's page: Move to another server. It's available when the environment is attached to a server and doesn't already have a move in progress.

Before you start

A few things need to be true for a move to go smoothly:

  • The target server is connected and online. Add and connect it first if you haven't — see Environments for how servers and environments relate.
  • The latest commit on the environment's branch will go live. The move deploys whatever is currently at the top of the environment's branch onto the new server. If you have changes you don't want live yet, deploy or revert them first.
  • No migrations are waiting to run. If the environment has pending database changes, run them before moving. strackt checks this again right before the switch-over.
  • The target has room. It needs enough disk and memory to hold the environment, and it can't already be running the same environment.

How a move works

Once you start a move, strackt walks through it for you:

  1. Sets up the target. It provisions the new server for this environment and deploys your application there.
  2. Copies your data across — repeatedly. It syncs your environment's data to the target and keeps re-syncing so the copy stays current while the original keeps serving traffic. You don't lose anything that happens during the move.
  3. Verifies the target. It confirms the new server is ready before anything switches.
  4. Waits for you to confirm the switch-over. Nothing cuts over automatically — the move pauses until you give the go-ahead.

The switch-over

When you confirm, strackt does a final data sync, points the environment at the new server, and updates the address so traffic flows to it.

There's a short freeze during this step — typically a few seconds — while the switch happens. Your application may briefly return an error until the new server starts serving. After that, the environment is live on its new home, and its domains resolve there automatically.

If you need to back out

You can roll a move back. Before the switch-over, rolling back simply cleans up the half-prepared target and leaves the original untouched. After the switch-over, rolling back returns the environment to its original server and restores its previous address.

Good to know

  • Connected services stay on the original server for now. If your environment uses a database or cache that lives on its current server, that service isn't moved with it — the environment connects back to it across servers after the move. Plan moves with that in mind.
  • A few visitors may briefly reach the old server. Some networks cache addresses longer than they should, so a small amount of traffic can keep hitting the old location for a short while after the switch until those caches expire.
  • A move that sits waiting too long flags itself. If a move stays at the verify step without being confirmed, the environment's page shows a warning after a day so it doesn't get forgotten.

What to do next

Was this helpful?

Related docs