Skip to content
Skillv1.0.0

flyio-upgrade-migration

Migrate between Fly.io platform versions including Apps v1 to v2 (Machines), flyctl upgrades, and Postgres major version upgrades. Trigger: "fly.io upgrade", "fly.io migration", "fly apps v2", "fly po

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (plugins/saas-packs/flyio-pack/skills/flyio-upgrade-migration/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill flyio-upgrade-migration. Copyright stays with the author (MIT).

Fly.io Upgrade & Migration

Overview

Guide for Fly.io platform migrations: Apps v1 (Nomad) to v2 (Machines), flyctl CLI upgrades, Postgres major version upgrades, and region migrations.

Prerequisites

  • Current platform documentation and an inventory of applications, machines, regions, volumes, databases, identities, and dependent consumers.
  • A staging environment, synthetic traffic/data, tested backup/restore, rollback owner, and explicit acceptance/reconciliation criteria.

Output

Produce a migration receipt with versions reviewed, affected resources, staging/canary results, backup/restore evidence, reconciliation outcome, approver, and rollback state. Keep tokens, connection strings, and user data out of the receipt.

Error Handling

  • Stop promotion on health, schema, region, permission, or reconciliation mismatches and restore the prior configuration.
  • Quarantine failed migrations by opaque resource ID; do not bulk replay stateful workloads to diagnose failures.
  • Escalate potential data loss or credential exposure and retain only approved incident evidence.

Examples

Migrate a disposable staging app using synthetic traffic, exercise a backup/restore of fictional data, and simulate a failed health check. Verify rollback returns routing and data access to the known-good release before considering a production canary.

Instructions

Apps v1 to v2 Migration

# Check current platform version
fly status -a my-app  # Look for "Platform: machines" vs "nomad"

# Migrate to Apps v2 (Machines)
fly migrate-to-v2 -a my-app

# Verify
fly status -a my-app
fly machine list -a my-app

flyctl CLI Upgrade

# Check current version
fly version

# Upgrade
fly version update

# Or reinstall
curl -L https://fly.io/install.sh | sh

Postgres Major Version Upgrade

# Check current version
fly postgres connect -a my-db -c "SELECT version();"

# Create new cluster with target version
fly postgres create --name my-db-v16 --region iad --image-ref flyio/postgres-flex:16

# Migrate data
fly postgres import pg_dump_url -a my-db-v16

# Update app to point to new cluster
fly postgres detach my-db -a my-app
fly postgres attach my-db-v16 -a my-app
fly deploy -a my-app  # Picks up new DATABASE_URL

Region Migration

# Add machines in new region
fly scale count 1 --region fra -a my-app

# Verify new region is healthy
fly status -a my-app

# Remove machines from old region
fly scale count 0 --region iad -a my-app

# For volumes: create new volume, migrate data, destroy old
fly volumes create data --size 10 --region fra -a my-app

Migration Checklist

  • Current state documented (fly status, fly scale show)
  • Database backed up before migration
  • Tested migration in staging app first
  • DNS/certificates transferred if changing domains
  • Monitoring confirms healthy after cutover
  • Old resources cleaned up

Resources

Next Steps

For CI integration, see flyio-ci-integration.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-flyio-upgrade-da1f19/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-flyio-upgrade-da1f19.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-flyio-upgrade-da1f19",
  "kind": "skill",
  "name": "flyio-upgrade-migration",
  "description": "Migrate between Fly.io platform versions including Apps v1 to v2 (Machines), flyctl upgrades, and Postgres major version upgrades. Trigger: \"fly.io upgrade\", \"fly.io migration\", \"fly apps v2\", \"fly postgres upgrade\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "saas",
      "edge-compute",
      "flyio",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Migrate between Fly.io platform versions including Apps v1 to v2 (Machines), flyctl upgrades, and Postgres major version upgrades. Trigger: \"fly.io upgrade\", \"fly.io migration\", \"fly apps v2\", \"fly postgres upgrade\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/flyio-pack/skills/flyio-upgrade-migration/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/flyio-pack/skills/flyio-upgrade-migration/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/flyio-pack/skills/flyio-upgrade-migration/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(fly:*),",
      "Grep"
    ],
    "license": "MIT"
  },
  "instructions": "# Fly.io Upgrade & Migration\n\n## Overview\n\nGuide for Fly.io platform migrations: Apps v1 (Nomad) to v2 (Machines), flyctl CLI upgrades, Postgres major version upgrades, and region migrations.\n\n## Prerequisites\n\n- Current platform documentation and an inventory of applications, machines, regions, volumes, databases, identities, and dependent consumers.\n- A staging environment, synthetic traffic/data, tested backup/restore, rollback owner, and explicit acceptance/reconciliation criteria.\n\n## Output\n\nProduce a migration receipt with versions reviewed, affected resources, staging/canary results, b",
  "cost": {
    "context_tokens": 782
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-flyio-upgrade-da1f19/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.