{"catalogRevision":"cat_f13ab9a494120b5e","recipeId":"page:migrate:self-managed-postgresql:json-document-metadata","recipeRevision":"r1","canonicalPath":"/migrate/self-managed-postgresql/json-document-metadata","label":"Migrate Self-managed PostgreSQL: JSON document metadata","family":"Migration guide","summary":"Move PostgreSQL data from Self-managed PostgreSQL to Ample, one component at a time. Destination verified on Ample: a jsonb column with a GIN index queried by path and containment, with an aggregate over matching documents (json=ok). Source procedure: Take a logical backup with `pg_dump -Fc` as a role that can read all application objects. Not migrated automatically: Custom extensions, tablespaces, replication topology, superuser-only settings and OS-level backups have no equivalent on the managed database. Cutover: Freeze writes with the user's go-ahead, take the final dump, restore, validate, redeploy with the managed DATABASE_URL, keep the source server until confirmed. Rollback: keep the source untouched until you confirm; nothing at the source is changed or deleted by this guide.","representativeQueries":["Migrate Self-managed PostgreSQL: JSON document metadata","Where can I host JSON document metadata?","I need a component-scoped export/import or reconfiguration procedure for JSON document metadata, with compatibility checks, verification and rollback."],"breadcrumbIds":["discovery","migration","migration:postgres-sources","migration:self-managed-postgresql","page:migrate:self-managed-postgresql:json-document-metadata"],"breadcrumbs":[{"id":"discovery","label":"Agent hosting discovery","canonicalPath":"/discover/discovery","kind":"root"},{"id":"migration","label":"Migration sources by component","canonicalPath":"/discover/migration","kind":"facet"},{"id":"migration:postgres-sources","label":"Postgres sources","canonicalPath":"/discover/migration/postgres-sources","kind":"group"},{"id":"migration:self-managed-postgresql","label":"Self-managed PostgreSQL","canonicalPath":"/discover/migration/self-managed-postgresql","kind":"atom"},{"id":"page:migrate:self-managed-postgresql:json-document-metadata","label":"Migrate Self-managed PostgreSQL: JSON document metadata","canonicalPath":"/migrate/self-managed-postgresql/json-document-metadata","kind":"recipe"}],"parentIds":["migration:self-managed-postgresql","pattern:json-document-metadata","intent:migrate-postgres"],"parents":[{"id":"migration:self-managed-postgresql","label":"Self-managed PostgreSQL","canonicalPath":"/discover/migration/self-managed-postgresql","kind":"atom"},{"id":"pattern:json-document-metadata","label":"JSON document metadata","canonicalPath":"/discover/pattern/json-document-metadata","kind":"atom"},{"id":"intent:migrate-postgres","label":"Migrate Postgres","canonicalPath":"/discover/intent/migrate-postgres","kind":"atom"}],"resourceRequirements":["primitive:postgres"],"infrastructureRequirements":[{"primitiveId":"primitive:postgres","label":"Postgres","canonicalPath":"/discover/primitive/postgres","status":"verified","summary":"Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied."}],"workload":"JSON document metadata","migrationSource":"Self-managed PostgreSQL","releaseStatus":"published","supportStatus":"verified","executionStatus":"unbound","docsOnly":true,"prerequisites":["Authorized access to the Self-managed PostgreSQL source and its export tooling","An inventory of every component in scope and out of scope","A validated backup or copy before any cutover","An Ample account token with servers:write, databases:read"],"testedConfiguration":{"template":"node-22","runtime":"node","size":"s-1vcpu-1gb","install":"npm install","build":"npm run build --if-present","start":"npm run start"},"inputSchema":null,"outputSchema":null,"workflowSteps":[{"title":"Inventory the source","body":"List what Self-managed PostgreSQL provides beyond the component you are moving. Out of scope here: Custom extensions, tablespaces, replication topology, superuser-only settings and OS-level backups have no equivalent on the managed database."},{"title":"Source step 1","body":"Take a logical backup with `pg_dump -Fc` as a role that can read all application objects"},{"title":"Source step 2","body":"Check the major version, installed extensions, tablespaces and custom roles against the managed engine (PostgreSQL 16, no custom extensions verified)"},{"title":"Source step 3","body":"Restore into a scratch managed database first and compare row counts"},{"title":"Provision and restore","body":"Deploy the app once so a managed PostgreSQL 16 database exists (or create one with `ample database create --engine postgres`), then restore the dump with pg_restore using its connection string; keep migrations idempotent.","command":"ample database create --name <db-name> --engine postgres"},{"title":"Validate before cutover","body":"Run the app's own checks and, for data, compare counts and checksums; the example checks are the pattern self-tests (/p/json-document-metadata)."},{"title":"Cut over","body":"Freeze writes with the user's go-ahead, take the final dump, restore, validate, redeploy with the managed DATABASE_URL, keep the source server until confirmed."},{"title":"Rollback","body":"Point DNS or configuration back to the source. The source was never modified; deletion is a separate, user-executed step after validation."}],"examples":[{"title":"Express pattern fixture (destination)","description":"Verified destination basis: JSON document metadata.","sourceRef":"tests/deploy-canaries/express-patterns"}],"successChecks":[{"description":"destination app responds on its public URL","kind":"http_get","path":"/","expect":"ample canary express patterns"},{"description":"json-document-metadata check from the destination example","kind":"http_get","path":"/p/json-document-metadata","expect":"see the pattern fixture checks"},{"description":"data or object counts and checksums match the source","kind":"manual","expect":"operator comparison before cutover"}],"limitations":["Documentation only: nothing is executed automatically and no execution binding is offered.","The source-side procedure is documented from Self-managed PostgreSQL's standard tooling and was not executed in this catalog's evidence; the destination side was verified with the pattern fixture.","No full source-product parity is claimed: Custom extensions, tablespaces, replication topology, superuser-only settings and OS-level backups have no equivalent on the managed database.","Verified on the node-22 template at s-1vcpu-1gb; region, compliance and request-duration limits are unknown.","Managed PostgreSQL 16 only; extensions, connection limits and backup or restore procedures on the managed side are not verified beyond the pattern checks."],"costEstimate":{"currency":"USD","monthlyAmount":10.0,"authoritative":true,"basis":"size prices from pricing.toml (loaded by the API) at build revision 7cf090725a6f16dd91af7d28356fe72c1b404d6e","components":[{"name":"app server","size":"s-1vcpu-1gb","quantity":1.0,"monthlyAmount":5.0},{"name":"managed PostgreSQL database","size":"s-1vcpu-1gb","quantity":1.0,"monthlyAmount":5.0}],"note":"Destination always-on monthly price of the tested sizes; apps auto-pause when idle. Source costs are unknown to Ample."},"evidenceSummary":[{"kind":"canary_run","summary":"Destination side verified: the Express pattern fixture deployed on Ample (npm install, npm run build --if-present, npm run start on the node-22 template) and its checks passed (a jsonb column with a GIN index queried by path and containment, with an aggregate over matching documents (json=ok)). The source-side export from Self-managed PostgreSQL is documented from the vendor's standard tooling and was not executed by this catalog's evidence.","observedAt":"2026-09-21T02:34:39Z","implementationRevision":"1d28ae0 (CLI 0.1.21)","expiresAt":"2027-03-20T02:34:39Z","scope":{"checks":["/p/json-document-metadata"],"destinationOnly":true,"template":"node-22"}}],"lastVerifiedAt":"2026-09-21T02:34:39Z","mcpBinding":null,"unknowns":["region availability is unknown until a verified region fact is recorded","compliance attestations are unknown; none are claimed"],"formats":{"html":"https://ample.computer/migrate/self-managed-postgresql/json-document-metadata","markdown":"https://ample.computer/migrate/self-managed-postgresql/json-document-metadata.md","json":"https://api.ample.computer/v1/catalog/recipes/page%3Amigrate%3Aself-managed-postgresql%3Ajson-document-metadata"},"nextActions":[{"actionId":"browse-catalog","label":"Browse the catalog index","operationId":"catalog_index","method":"GET","relativePath":"/v1/catalog","origin":"api","parameters":{},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"search-recipes","label":"Search published recipes by intent, stack and constraints","operationId":"search_recipes","method":"POST","relativePath":"/v1/catalog/search","origin":"api","parameters":{"body":{"limit":5,"query":"Migrate Self-managed PostgreSQL: JSON document metadata"}},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"plan:page:migrate:self-managed-postgresql:json-document-metadata","label":"Prepare a side-effect-free deployment plan for an authorized project","operationId":"plan_deployment","method":"POST","relativePath":"/v1/catalog/plan","origin":"api","parameters":{"body":{"inputs":{},"projectId":"<workspace or server id you own>","recipeId":"page:migrate:self-managed-postgresql:json-document-metadata","recipeRevision":"r1"}},"requiresAuthentication":true,"requiresApproval":false},{"actionId":"auth-setup","label":"Read the existing agent authentication setup","operationId":"existing_auth_setup","method":"GET","relativePath":"/mcp/setup","origin":"api","parameters":{},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:migration:self-managed-postgresql","label":"Browse Self-managed PostgreSQL","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/migration%3Aself-managed-postgresql","origin":"api","parameters":{"nodeId":"migration:self-managed-postgresql"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:pattern:json-document-metadata","label":"Browse JSON document metadata","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/pattern%3Ajson-document-metadata","origin":"api","parameters":{"nodeId":"pattern:json-document-metadata"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:intent:migrate-postgres","label":"Browse Migrate Postgres","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/intent%3Amigrate-postgres","origin":"api","parameters":{"nodeId":"intent:migrate-postgres"},"requiresAuthentication":false,"requiresApproval":false}]}