You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this app, avoid bringing up many regions simultaneously. Prefer cloning one
338
+
machine at a time from the current primary and waiting for checks to pass
339
+
before adding the next region:
340
+
341
+
```sh
342
+
fly machine clone <PRIMARY_MACHINE_ID> -a kcd --region <REGION>
343
+
fly machine status <NEW_MACHINE_ID> -a kcd
344
+
fly checks list -a kcd
345
+
```
346
+
337
347
### Removing regions
338
348
339
349
Similar to adding regions, maybe backup the data.
@@ -363,6 +373,26 @@ And when you're finished, scale down to the number of volumes you have:
363
373
fly scale count <COUNT>
364
374
```
365
375
376
+
If cleanup leaves any machines in a non-started state, destroy them:
377
+
378
+
```sh
379
+
foridin$(fly m list -a kcd --json | jq -r '.[] | select(.state != "started") | .id');do
380
+
fly machine destroy "$id" -a kcd --force
381
+
done
382
+
```
383
+
384
+
After removing regions, also clean up unattached volumes in those regions so
385
+
you are not paying for orphaned storage:
386
+
387
+
```sh
388
+
foridin$(fly vol list -a kcd --json | jq -r '.[] | select(.attached_machine_id == null and (.region=="jnb" or .region=="ams" or .region=="sin" or .region=="bom" or .region=="syd" or .region=="cdg")) | .id');do
389
+
fly vol destroy "$id" -a kcd --yes
390
+
done
391
+
```
392
+
393
+
Run `fly vol list -a kcd` first and do not delete volumes attached to active
After intentionally removing regions, delete unattached volumes in those
104
+
regions to avoid ongoing storage costs.
105
+
106
+
```bash
107
+
foridin$(fly vol list -a kcd --json | jq -r '.[] | select(.attached_machine_id == null and (.region=="jnb" or .region=="ams" or .region=="sin" or .region=="bom" or .region=="syd" or .region=="cdg")) | .id');do
108
+
fly vol destroy "$id" -a kcd --yes
109
+
done
67
110
```
68
111
69
-
Fly may recreate machines based on previous configuration. If replicas are not
70
-
recreated, you may need to clone the primary to other regions via the Fly
71
-
dashboard or `fly machine clone`.
112
+
Always review `fly vol list -a kcd` first and keep attached volumes in active
113
+
regions (`dfw`/`gru`).
72
114
73
115
## Notes
74
116
@@ -77,3 +119,6 @@ dashboard or `fly machine clone`.
77
119
(primary_region in fly.toml).
78
120
-**Machine IDs**: Run `fly machines list -a kcd` to get current IDs before
79
121
scaling down — they may change between runs.
122
+
-**Avoid parallel startup**: Starting many regional machines concurrently can
123
+
create noisy health-check failures and slow recovery; prefer strict serial
0 commit comments