migrations
Skill535 starsChanged 5 months agoMITView on GitHub
Use when moving a Butterbase app between regions, checking migration progress, aborting a stuck move, reverse-rolling a completed move, or tearing down retained source replicas after a move is stable
Files
Butterbase App Migrations (Multi-Region)
Moving an app between regions is an orchestrated migration: data dumped from source, restored in dest, blobs copied, runtime brought up, then traffic flipped. Source replica is retained for safe rollback until you tear it down.
Four small tools wrap the orchestration:
| Tool | Purpose |
list_regions | Discover what regions exist before suggesting one. |
move_app | Start a migration. Returns a migration_id. |
move_app_status | Read the current step + replica state of a specific migration. |
manage_migrations | Operational ops: get_active, abort, reverse, list_source_replicas. |
teardown_source_replica | Decommission the retained source replica once you're confident. |
1. The step sequence
A successful move walks through 11 steps in order:
requested → reserving_dest → blocking_writes → dumping_data →
restoring_data → copying_blobs → copying_runtime → flipping_routing →
setting_up_reverse_replication → unblocking_writes → completedThe cutover happens at flipping_routing. Before that, the app is still served from the source. After that, traffic is on the destination.
Terminal states: completed, aborted, failed.
2. Start a move
list_regions → confirm dest region is supported
move_app(app_id, dest_region) → { migration_id, status: "queued" }Then poll with move_app_status({ app_id, migration_id }) every few seconds (or call manage_migrations({ action: "get_active", app_id }) if you've forgotten the id).
3. Recovery: pick the right escape hatch
Stuck or wrong choice? Different state, different tool:
- Before
flipping_routing(still in dump / restore / copy phases): usemanage_migrationsaction: "abort". Cancels cleanly; no data flipped. - After
flipping_routing(already cut over): abort is locked. Usemanage_migrationsaction: "reverse". This rolls back to source — works only while the source replica is still retained (i.e. you haven't calledteardown_source_replicayet). - Move is done and stable (the new region is serving traffic without issues for a while): use
teardown_source_replica({ migration_id }). Stops paying for source-region storage. After this,reverseis no longer available.
4. Inspecting in-flight + retained state
manage_migrations({ action: "get_active", app_id })→{ migration: AppMigration | null }. Tells you if a move is in progress right now.manage_migrations({ action: "list_source_replicas" })→ all retained replicas the caller owns. Call this before any teardown so you know what you'd lose.
5. Common pitfalls
- Calling
move_appagain while one is active — backend returns 409ineligible. Resolve by waiting for the active migration to terminate, or aborting it first. - Trying to abort after cutover — returns 409. The path forward is
reverse, not abort. - Tearing down a replica too early — once it's gone, reverse-move is no longer possible. Verify the destination region has been serving traffic cleanly before teardown.
- Forgetting
dest_regionis validated — invalid slugs return 400. Alwayslist_regionsfirst if you're not sure.
6. What this skill does NOT cover
- Schema migrations (table/column changes) — use
butterbase-skills:schema-design. - Region selection at app creation time — use
init_appdirectly with theregionparameter. - Cross-region replica reads (none — Butterbase is single-region-active per app).
Other versions6 projects use a version of this.
Word for word · 1
- butterbase-ai/butterbase-skills★ 535100% same
Edited · 0
None found.
Wrote their own version · 5
- dotnet/efcore★ 15ksame name
- theopenco/llmgateway★ 1.7ksame name
- orangehrm/orangehrm★ 1.1ksame name
- nahid-sparktales/agent-dispatcher★ 59same name
- hallucinaut/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- butterbase-skillsSkill
- agentsSkill
- aiSkill
- auth-setupSkill
- build-appSkill
- contributingSkill
- debug-rlsSkill
- deploy-frontendSkill
- durable-objectsSkill
- function-devSkill
- integrationsSkill
- journey-agentsSkill
- journey-aiSkill
- journey-authSkill
- journey-deploySkill
- journey-docsSkill
- journey-durableSkill
- journey-frontendSkill
- journey-functionsSkill
- journey-ideaSkill
- journey-planSkill
- journey-preflightSkill
- journey-ragSkill
- journey-realtimeSkill
- journey-rlsSkill
- journey-schemaSkill
- journeySkill
- journey-storageSkill
- journey-submitSkill
- journey-substrateSkill
- journey-templatesSkill
- meetingsSkill
- paymentsSkill
- rag-devSkill
- realtimeSkill
- schema-designSkill
- storageSkill
- substrateSkill
- templatesSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

