The CFO asks why the Montreal-based product team is hosting in a Frankfurt data center. Latency to your largest customer cluster is 110ms when it could be 12ms. You agree to move the environment from eu-fra to na-mtl on the same PaaS hoster. The provider’s panel offers a “Region” dropdown on the environment but it’s read-only after creation. There is no in-place Move. What exists is clone-across-region, and a clone-across-region is a starting point, not the migration — you still own the data replication, the cutover, and the rollback.
What’s happening
A cross-region migration on managed PaaS is mechanically similar to a blue-green clone, except:
- The clone is to a different region, which means a different internal network, different default IPs, and possibly a different feature set of available add-ons or container images.
- Network latency between source and target is real (10-100ms typical between regions on the same hoster), which means your sync method has to tolerate latency. Synchronous replication between regions is usually unworkable; you’ll use a snapshot + delta-replay pattern.
- The public hostname has to move with the environment, but the DNS TTL governs how fast traffic actually shifts. Get TTL down before the cutover, not during.
- External integrations (webhooks pointing at the env, IPs whitelisted by partners, mail relay outbound IPs) have to be updated to the new region’s IPs.
- Some hosters bill egress between regions, so the data-transfer phase has a cost line. Budget it before you transfer 500GB to find out.
The clone-across-region copies the topology. Everything operational is a separate workstream.
How to verify
Before kicking off the migration, audit what makes this environment region-coupled:
# 1. What's the source environment's footprint?
jelastic-cli environment Control GetEnvInfo --envName acme-fra \
| jq '{region, nodes:[.nodes[]|{group:.nodeGroup,disk:.diskLimit,memory:.fixedCloudlets}]}'
# 2. Outbound IPs the world has whitelisted on the source
jelastic-cli environment Control GetEnvInfo --envName acme-fra \
| jq '.envExtIPs'
# 3. What add-ons are installed, and which ones are region-specific?
jelastic-cli environment Control GetEnvInfo --envName acme-fra \
| jq '.nodes[].addons[]?|{name,nodeGroup}'
# 4. What hostnames are bound?
jelastic-cli environment Binder GetExtDomains --envName acme-fra
# 5. Current DNS TTL on the production hostname
dig +short www.acme.tld @1.1.1.1
dig www.acme.tld @1.1.1.1 | awk '/^www/ {print $1, $2}'
The TTL output is the most important number to verify early. If the production hostname has a TTL of 3600 (one hour), your cutover window is at minimum one hour. Drop it to 60 seconds at least 24 hours before cutover.
Confirm the target region actually offers parity:
# List available hardware nodes in target region
jelastic-cli environment Control GetHardwareNodeList \
--hardwareNodeGroup default --region na-mtl
# Check marketplace coverage in target region for each add-on you depend on
for addon in lets-encrypt-ssl-addon cron-addon haproxy-load-balancer; do
echo "=== ${addon} ==="
jelastic-cli marketplace App GetApp --jps "${addon}" --region na-mtl \
|| echo "NOT AVAILABLE in target region"
done
If an add-on isn’t available in the target region, you need an alternative or a workaround before you start the clone. Discovering that on cutover day is preventable.
The fix
#!/usr/bin/env bash
set -euo pipefail
SRC_ENV="acme-fra"
SRC_REGION="eu-fra"
TGT_ENV="acme-mtl"
TGT_REGION="na-mtl"
HOST_PROD="www.acme.tld"
# T-7 days
echo "==> 1. Lower DNS TTL on ${HOST_PROD} to 60s; wait 24h for caches to age out"
# (Done in DNS provider, not in PaaS — record the date here)
echo "==> 2. Pre-cutover dry-run clone to validate topology"
jelastic-cli environment Control CloneEnv \
--srcEnvName "${SRC_ENV}" \
--dstEnvName "${TGT_ENV}-dry" \
--region "${TGT_REGION}" \
--withExtIPs false \
--withStorage true
# Run smoke against the dry-run; identify add-on or image gaps; tear it down
./smoke.sh "https://${TGT_ENV}-dry.${HOSTER_DOMAIN}/" || \
{ echo "Dry-run failed; fix gaps before scheduling cutover"; exit 1; }
jelastic-cli environment Control DeleteEnv --envName "${TGT_ENV}-dry"
# T-1 day
echo "==> 3. Snapshot source as rollback anchor"
jelastic-cli environment Control CreateEnvBackup \
--envName "${SRC_ENV}" \
--comment "pre-region-migration-$(date -u +%Y%m%dT%H%M%S)"
# T-0
echo "==> 4. Clone to target region for real, including storage"
jelastic-cli environment Control CloneEnv \
--srcEnvName "${SRC_ENV}" \
--dstEnvName "${TGT_ENV}" \
--region "${TGT_REGION}" \
--withExtIPs false \
--withStorage true
echo "==> 5. Open inter-region replication for the DB tier"
# MySQL example: target acts as replica of source until cutover
SRC_DB_IP=$(jelastic-cli environment Control GetEnvInfo --envName "${SRC_ENV}" \
| jq -r '.nodes[]|select(.nodeGroup=="sqldb")|.intIP')
TGT_DB_IP=$(jelastic-cli environment Control GetEnvInfo --envName "${TGT_ENV}" \
| jq -r '.nodes[]|select(.nodeGroup=="sqldb")|.intIP')
# Configure target as replica
jelastic-cli environment Control ExecCmdByGroup \
--envName "${TGT_ENV}" --nodeGroup sqldb \
--commandList "[{\"command\":\"mysql -uroot -p\${MYSQL_ROOT_PASSWORD} -e \\\"CHANGE MASTER TO MASTER_HOST='${SRC_DB_IP}', MASTER_USER='repl', MASTER_PASSWORD='\${REPL_PASSWORD}', MASTER_AUTO_POSITION=1; START SLAVE;\\\"\"}]"
# Wait for Seconds_Behind_Master near zero
while true; do
LAG=$(jelastic-cli environment Control ExecCmdByGroup \
--envName "${TGT_ENV}" --nodeGroup sqldb \
--commandList '[{"command":"mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e \"SHOW SLAVE STATUS\\G\""}]' \
| grep -oP 'Seconds_Behind_Master: \K[0-9]+' || echo "99999")
echo "Replication lag: ${LAG}s"
[[ "${LAG}" -lt 5 ]] && break
sleep 30
done
echo "==> 6. Sync persistent storage (rsync delta, repeatable)"
# Initial copy already came with clone; this catches the divergence window
jelastic-cli environment Control ExecCmdByGroup \
--envName "${TGT_ENV}" --nodeGroup storage \
--commandList "[{\"command\":\"rsync -avz --delete root@${SRC_STORAGE_IP}:/data/ /data/\"}]"
echo "==> 7. Brief read-only window on source for clean cutover"
# Application-specific. Examples:
# - Set a feature flag that returns 503 to writes
# - Flip the source LB into read-only mode
# - For DB: STOP SLAVE on target, then SET GLOBAL read_only=ON on source
# Final delta sync
jelastic-cli environment Control ExecCmdByGroup \
--envName "${TGT_ENV}" --nodeGroup storage \
--commandList "[{\"command\":\"rsync -avz --delete root@${SRC_STORAGE_IP}:/data/ /data/\"}]"
# Promote target DB to writable
jelastic-cli environment Control ExecCmdByGroup \
--envName "${TGT_ENV}" --nodeGroup sqldb \
--commandList '[{"command":"mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e \"STOP SLAVE; RESET SLAVE ALL; SET GLOBAL read_only=OFF;\""}]'
echo "==> 8. Move hostname and re-issue SSL on target"
jelastic-cli environment Binder RemoveDomains \
--envName "${SRC_ENV}" --domains "${HOST_PROD}"
jelastic-cli environment Binder BindExtDomains \
--envName "${TGT_ENV}" --extdomains "${HOST_PROD}"
# Update DNS record to point at target's load balancer / public IP
TGT_LB_IP=$(jelastic-cli environment Control GetEnvInfo --envName "${TGT_ENV}" \
| jq -r '.envExtIPs[0]')
echo "Update DNS A record: ${HOST_PROD} -> ${TGT_LB_IP}"
# DNS API call to your provider here (Route53, Cloudflare, etc.)
# Re-issue SSL once DNS is propagating
jelastic-cli marketplace Installation Install \
--envName "${TGT_ENV}" --jps lets-encrypt-ssl-addon \
--settings "{\"externaldomains\":\"${HOST_PROD}\"}"
echo "==> 9. Notify partners with whitelisted IPs of the new outbound range"
jelastic-cli environment Control GetEnvInfo --envName "${TGT_ENV}" \
| jq -r '.envExtIPs[]' > new-outbound-ips.txt
echo "==> 10. Hold source as rollback anchor for 24-72h"
# Stop deploying to source, but don't delete it.
# After the rollback window, terminate source and reclaim the resources.
The post-cutover watch is the part that catches everything the runbook didn’t predict. For the first 24 hours after the swap, you want a human paying attention to error rates, latency percentiles, mail delivery (if the env sends mail and partner relays whitelist by IP), and any third-party webhook that targets your old IPs.
Bring the DNS TTL back up after 48 hours of stability — leaving it at 60s long-term increases query volume on your authoritative nameservers without benefit.
Stack Harbor handles cross-region PaaS migrations end-to-end, including the inter-region replication, the cutover orchestration, and the 24-hour post-cutover watch as part of environment management. For a region move that has to land cleanly the first time, scope the migration with our team.