Fly.io
Postgres Clusters

Fork Cluster to New Cluster

View as Markdown

Fork a ready Managed Postgres cluster into a new cluster that inherits the source's settings. The source cluster is left unchanged, and the fork is provisioned asynchronously.

POST
/v1/postgres/{postgres_cluster_id}/fork

Fork a ready Managed Postgres cluster into a new cluster that inherits the source's settings. The source cluster is left unchanged, and the fork is provisioned asynchronously.

Authorization

bearerAuth
AuthorizationBearer <token>

A Fly.io access token. Create one with fly tokens create.

In: header

Path Parameters

postgres_cluster_id*string

Managed Postgres Cluster ID

Request Body

application/json

Fork details

name?string

Name for the forked cluster. Defaults to the source name with a -fork suffix.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/postgres/string/fork" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "attached_apps": [      {        "name": "string"      }    ],    "cpu_kind": "shared",    "cpus": 2,    "created_at": "string",    "disk_size_gb": 10,    "endpoints": {      "primary": {        "direct": {          "host": "string",          "port": 0        },        "pooler": {          "host": "string",          "port": 0        }      }    },    "id": "string",    "memory_mb": 1024,    "name": "string",    "organization": {      "name": "string",      "slug": "string"    },    "pg_major_version": "17",    "plan": "basic",    "postgis_enabled": true,    "region": "iad",    "replicas": 1,    "status": "ready"  }}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}