---
title: How to Relocate Database Clusters
description: Change a cluster&#39;s regional datacenter.
product: Databases
url: https://docs.digitalocean.com/products/databases/postgresql/how-to/relocate/
last_updated: "2026-09-30"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# How to Relocate Database Clusters

PostgreSQL is an open source, object-relational database built for extensibility, data integrity, and speed. Its concurrency support makes it fully ACID-compliant, and it supports dynamic loading and catalog-driven operations to let users customize its data types, functions, and more.

Relocating a database cluster changes which DigitalOcean datacenter hosts it. We recommend hosting your DigitalOcean resources in the same datacenter. This minimizes the latency in connections between them and helps improve performance.

**Note**:

  Cluster relocation is available for PostgreSQL Standard Edition clusters only. Advanced Edition does not support migrating an existing cluster to another region. To move data to another region, create an Advanced Edition cluster in the target region and [import a dump with `pg_dump`](https://docs.digitalocean.com/products/databases/postgresql/how-to/migrate/index.html.md#import-a-dump-with-pg_dump). See [PostgreSQL Limits](https://docs.digitalocean.com/products/databases/postgresql/details/limits/index.html.md) for the current unsupported-feature list.

## Relocate a Database Cluster Using Automation

You can relocate a database cluster using the DigitalOcean CLI (`doctl`) or the API.

### Relocate a Database Cluster via CLI

**Note**:

  To migrate a database cluster using `doctl`, you need to provide a value for the `--region` flag. Use the [`doctl databases options regions`](https://docs.digitalocean.com/reference/doctl/reference/databases/options/regions/index.html.md) command to get a list of available values.

## How to Migrate a Database Using the DigitalOcean CLI

1. [Install `doctl`](https://docs.digitalocean.com/reference/doctl/how-to/install/index.html.md), the official DigitalOcean CLI.
2. [Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with `doctl`.
3. Use the token to grant `doctl` access to your DigitalOcean account.```shell
   doctl auth init
   ```
4. Finally, run `doctl databases migrate`. Basic usage looks like this, but you can [read the usage docs](https://docs.digitalocean.com/reference/doctl/reference/databases/migrate/index.html.md) for more details:```shell
   doctl databases migrate <database-cluster-id> [flags]
   ```

## How to Relocate a Database Cluster Using the DigitalOcean CLI

1. [Install `doctl`](https://docs.digitalocean.com/reference/doctl/how-to/install/index.html.md), the official DigitalOcean CLI.
2. [Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with `doctl`.
3. Use the token to grant `doctl` access to your DigitalOcean account.```shell
   doctl auth init
   ```
4. Finally, run `doctl databases migrate`. Basic usage looks like this, but you can [read the usage docs](https://docs.digitalocean.com/reference/doctl/reference/databases/migrate/index.html.md) for more details:```shell
   doctl databases migrate <database-cluster-id> [flags]
   ```

### Relocate a Database Cluster via API

## How to Relocate a Database Cluster Using the DigitalOcean API

[Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with the API.

### cURL

Send a PUT request to [`https://api.digitalocean.com/v2/databases/{database_cluster_uuid}/migrate`](https://docs.digitalocean.com/reference/api/reference/databases/index.html.md#databases_update_region).

Using cURL:

```shell
curl -X PUT \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  -d '{"region":"lon1"}' \
  "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/migrate"
```

### Go

Using [Godo](https://github.com/digitalocean/godo), the official DigitalOcean API client for Go:

```go
import (
    "context"
    "os"

    "github.com/digitalocean/godo"
)

func main() {
    token := os.Getenv("DIGITALOCEAN_TOKEN")

    client := godo.NewFromToken(token)
    ctx := context.TODO()

    migrateRequest := &godo.DatabaseMigrateRequest{
        Region: "lon1",
    }

    _, err := client.Databases.Migrate(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", migrateRequest)
}
```

### Python

Using [PyDo](https://github.com/digitalocean/pydo), the official DigitalOcean API client for Python:

```python
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "region": "lon1"
}

update_resp = client.databases.update_region(database_cluster_uuid="a7a8bas", body=req)
```

## Relocate a Database Cluster using the Control Panel

To relocate a database cluster from the control panel, select your database cluster from the [**Databases** page](https://cloud.digitalocean.com/databases). Click the name of the cluster to go to its **Overview** page, then click the **Settings** tab.

![Cluster settings page.](https://docs.digitalocean.com/screenshots/databases/postgresql-settings.ecb4f46d6b8fc5b1a228a403693b264f36a3297ccfef1bfa7e41e2f938271e4d.png)

On the **Settings** page, in the **Cluster datacenter** section, click **Edit**. Select the region and datacenter to which you want to relocate your cluster.

![Datacenter selection screen.](https://docs.digitalocean.com/screenshots/databases/cluster-datacenters.389564ba23f9de7d528e089b33776fa717a3cf15e07498d1936a8c98644aa11e.png)

Click **Save** to begin the relocation process. The time to complete the relocation varies depending on the size of the cluster and its data.