How to Migrate Data Between Services using Cloud Foundry Tasks
summary
Demonstrates migrating a live PostgreSQL service instance to a new instance entirely inside Cloud Foundry by running an app task that streams a dump straight into the target, avoiding local downloads or external egress. Uses pg_dump | psql piped from source to destination, extracts credentials with jq and VCAP_SERVICES, and runs via cf run-task (or bundled deps in the app). Recommends pausing writes for the dump, migrating to a single-node plan, and shows a Postgres10 → Postgres11 migration that preserves the four-row posts table.
AI-written summary · about
