- URL:
- https://<root>/data/<datastoreID>/migrateToCloudDb
- Methods:
POST
- Required Capability:
- Access allowed only with the default administrator role
- Version Introduced:
- 11.5
Description
The migrate
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 provider | Cloud-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 cloud
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
{
"name": "AWS",
"cloudServices": [
{
"name": "AWS RDS for PostgreSQL",
"category": "databases",
"type": "relationalStore",
"instanceProvided": true,
"usage": "DEFAULT",
"connection": {
"dbUri": "<primary_relational_database_endpoint_url>",
Azure Kubernetes Service (AKS)
The following shows a sample JSON object that demonstrates the configuration for Azure Database for PostgreSQL relational flexible server:
{
"name": "AZURE",
"cloudServices": [
{
"name": "Azure PostgreSQL",
"category": "databases",
"type": "relationalStore",
"instanceProvided": true,
"usage": "DEFAULT",
"connection": {
"dbUri": "<primary_relational_database_endpoint_url>",
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
{
"name": "GCP",
"cloudServices": [
{
"name": "Cloud SQL for PostgreSQL",
"category": "databases",
"type": "relationalStore",
"instanceProvided": true,
"usage": "DEFAULT",
"connection": {
"dbUri": "<primary_relational_database_endpoint_url>",
Request parameters
Parameter | Details |
---|---|
(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 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:
|
(Required) | A JSON object that defines the persistent volume used for temporary storage during the migration process. The object must include the following properties:
Example
|
| The response format. The default format is Values: |
Example usage
The following is a sample POST request for the migrate
operation:
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 migrate
job request is submitted, the following JSON response is returned:
{
"jobsUrl": "https://organization.example.com/<context>/admin/jobs/jd037afbe-e747-4423-abc3-7f780d8efcae",
"jobid": "jd037afbe-e747-4423-abc3-7f780d8efcae",
"status": "SUBMITTED"
}
The value for jobs
can be used to access the job resource.