Migrate

URL:
https://<root>/data/<datastoreID>/migrateToCloudDb
Methods:
POST
Required Capability:
Access allowed only with the default administrator role
Version Introduced:
11.5

Description

The migrateToCloudDb operation migrates an organization's hosted relational store to a cloud-native relational store. This operation is performed using the standby relational store. Once the operation is initiated, the source database is placed into read-only mode. This operation should be performed during non-peak hours to avoid any potential disruption during the migration process.

In addition to migrating data from the hosted relational store to the cloud-native relational store, services will also have their spatial data type modified from ST_Geometry, which is used in ArcGIS hosted relational stores, to the PostGIS spatial data type.

Organizations that migrate to using cloud-native relational stores must ensure that they upgrade the PostgreSQL major versions first before upgrading their deployment.

Supported cloud-native relational stores

ArcGIS Enterprise on Kubernetes supports Amazon Elastic Kubernetes Service (EKS), Azure Kubernetes Service (AKS), and Google Kubernetes Engine (GKE) as cloud service providers. When migrating from an ArcGIS managed PostgreSQL instance to a cloud-native PostgreSQL instance, it is recommended to use cloud-native services that correspond to your environment's cloud provider. For example:

Cloud providerCloud-native relational store

Amazon Elastic Kubernetes Service (EKS)

Amazon Relational Database Service (RDS) for PostgreSQL, Amazon Aurora for PostgreSQL

Azure Kubernetes Service (AKS)

Azure Database for PostgreSQL flexible server

Google Kubernetes Engine (GKE)

Cloud SQL, AlloyDB for PostgreSQL


The following sections provide JSON examples for the cloudConfig parameter for each supported cloud provider.

Amazon Elastic Kubernetes Service (EKS)

The switcher below shows sample JSON objects that demonstrates the configuration for the following:

  • Amazon RDS for PostgreSQL
  • Amazon Aurora for PostgreSQL
Amazon RDS for PostgreSQLAmazon RDS for PostgreSQLAmazon Aurora for PostgreSQL
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  "name": "AWS",
  "cloudServices": [
    {
      "name": "AWS RDS for PostgreSQL",
      "category": "databases",
      "type": "relationalStore",
      "instanceProvided": true,
      "usage": "DEFAULT",
      "connection": {
        "dbUri": "<primary_relational_database_endpoint_url>",
Expand

Azure Kubernetes Service (AKS)

The following shows a sample JSON object that demonstrates the configuration for Azure Database for PostgreSQL relational flexible server:

Example
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  "name": "AZURE",
  "cloudServices": [
    {
      "name": "Azure PostgreSQL",
      "category": "databases",
      "type": "relationalStore",
      "instanceProvided": true,
      "usage": "DEFAULT",
      "connection": {
        "dbUri": "<primary_relational_database_endpoint_url>",
Expand

Google Kubernetes Engine (GKE)

The following shows sample JSON object sample JSON objects that demonstrates the configuration for the following:

  • Cloud SQL for PostgreSQL
  • AlloyDB for PostgreSQL
Cloud SQL for PostgreSQLCloud SQL for PostgreSQLAlloyDB for PostgreSQL
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  "name": "GCP",
  "cloudServices": [
    {
      "name": "Cloud SQL for PostgreSQL",
      "category": "databases",
      "type": "relationalStore",
      "instanceProvided": true,
      "usage": "DEFAULT",
      "connection": {
        "dbUri": "<primary_relational_database_endpoint_url>",
Expand

Request parameters

ParameterDetails

cloudConfig

(Required)

A JSON object containing the cloud storage configuration for a cloud-native relational data store. The configurations for cloud-native relational data stores are comprised of two main components: one that outlines the cloud service provider information, and one that outlines the specific cloud service used. The provider portion consists of the name property, which specifies the name of the cloud provider.

The service portion of a cloud storage configuration contains information on the cloud services. While the configuration may vary depending on the cloud service provider, there are a number of properties that the configuration must include:

  • name: The name of the cloud database service provider.
  • category: The category of the service, the value of which must be databases.
  • type: The service type, the value of which must be relationalStore.
  • connection: The connection information for the service, which includes properties that specify the region, database URI, port information, and credentials.
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  "name": "AWS",
  "cloudServices": [
    {
      "name": "AWS Aurora for PostgreSQL",
      "category": "databases",
      "type": "relationalStore",
      "instanceProvided": true,
      "usage": "DEFAULT",
      "connection": {
        "dbUri": "<primary_relational_database_endpoint_url>",
Expand

volumeConfig

(Required)

A JSON object that defines the persistent volume used for temporary storage during the migration process. The object must include the following properties:

  • provisioningType: Specifies the provisioning type (either DYNAMIC or STATIC).
  • storageClass: Specifies the storage class.
  • size: Defines the size of the storage volume (ex: 128Gi).
  • labels: Defines any key-value pairs used to categorize and manage the persistent volume.
Example
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "provisioningType": "DYNAMIC",
  "storageClass": "arcgis-storage-default",
  "size": "128Gi",
  "labels": {
    "arcgis/app": "migration"
  }
}

f

The response format. The default format is html.

Values: html | json | pjson

Example usage

The following is a sample POST request for the migrateToCloudDb operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
POST /<context>/data/59440620fc32411384d1f666c1ce13f1/migrateToCloudDb HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

cloudConfig={
  "name": "AWS",
  "cloudServices": [
    {
      "name": "AWS Aurora for PostgreSQL",
      "category": "databases",
      "type": "relationalStore",
      "instanceProvided": true,
      "usage": "DEFAULT",
      "connection": {
        "dbUri": "<primary_relational_database_endpoint_url>",
        "dbReadonlyUri": "<primary_relational_database_endpoint_url>",
        "dbPort": 5432,
        "credential": {
          "type": "databaseUser",
          "databaseUsers": {
            "adminUser": {
              "authType": "PASSWORD",
              "name": "<db name>",
              "password": "<password>"
            }
          }
        }
      }
    }
  ]
}&volumeConfig={
  "provisioningType": "DYNAMIC",
  "storageClass": "arcgis-storage-default",
  "size": "128Gi",
  "labels": {
    "arcgis/app": "migration"
  }
}&f=pjson&token=1Qnjkn_G1Fcgc0CtuIW4cywdKl2PnKH2t_hzngmO8irdflstsIxCUAQ_W8lPkENcmYVm18AEX45ef2XRLUNcjAQSdILD7Lu7mPAAx6K4OPwpV4IDbwDRNH2CLkU042HVslLXO3fNrMQKiL9lJ9ddih84fBDDrF_F_Y_CYZK2wnwO4W7P-WcPBIqaLNHLKmFVjzSks94Ke8ZDvY7FWlCDKFKlv4fy040gQn4QSMOzFMWOWlfOID-f8y2Y8mKcB6Ir

JSON Response examples

When the migrateToCloudDb job request is submitted, the following JSON response is returned:

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "jobsUrl": "https://organization.example.com/<context>/admin/jobs/jd037afbe-e747-4423-abc3-7f780d8efcae",
  "jobid": "jd037afbe-e747-4423-abc3-7f780d8efcae",
  "status": "SUBMITTED"
}

The value for jobsUrl can be used to access the job resource.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.