Migrate Search Engine Service

Prev Next

Available in Classic and VPC

You can migrate data from an Elasticsearch cluster created in the Search Engine Service Classic environment to an Elasticsearch or OpenSearch cluster in the VPC environment. To migrate data, follow the steps below in order.

1. Preliminary tasks for data migration
2. Create Classic cluster snapshot
3. Restore snapshot to VPC cluster

1. Preliminary tasks for data migration

To perform the preliminary task for data migration:

  1. Follow these steps for the cluster in the Classic environment.
  2. Create an Elasticsearch or OpenSearch cluster in the VPC environment (see Create cluster).
  3. Follow these steps for the cluster created in the VPC environment:

2. Create Classic cluster snapshot

Create a snapshot of a cluster in the Classic environment.

Note

This section provides a brief overview of snapshot creation. For more information, see Create snapshot using Elasticsearch API.

To create a snapshot of a cluster in the Classic environment:

  1. Access Kibana installed on the cluster for which you want to create a snapshot.
  2. Click the Dev Tools menu.
  3. In the console, run the following command to create a repository.
    PUT _snapshot/my-own-snapshot-repository
    {    
       "type" : "s3",  
       "settings": {        
             "region" : "kr",
             "endpoint" : "https://kr.object.ncloudstorage.com",
             "bucket": "name of the bucket to store snapshots",
             "path_style_access": "true",
             "access_key":"Access Key ID value",
             "secret_key":"Secret Key value"
          }
    }
    
    • my-own-snapshot-repository: Name the repository.
    • access_key, secret_key: API authentication key values. For more information on API authentication keys, see Ncloud API.
  4. In the console, run the following command to create a snapshot.
    PUT _snapshot/my-own-snapshot-repository/my-own-snapshot-name
    {
    "indices": "*,-.kibana*"
    }
    
    • Create snapshots for all indices except those related to Kibana.
    • If you create a snapshot that includes Kibana-related indices, you must exclude those indices when restoring the snapshot.

3. Restore snapshot to VPC cluster

Restore data to a cluster in the VPC environment using the snapshot.

Note

This section provides a brief overview of snapshot restoration. For more information, see Restore snapshot.

To restore a snapshot to a cluster in the VPC environment:

  1. Access Kibana or OpenSearch Dashboards installed on the cluster.

  2. In Kibana or OpenSearch Dashboards, select the Dev Tools menu.

  3. In the console, run the following command to create a repository to restore.

    PUT _snapshot/restore-repository
    {  
    "type" : "s3",  
    "settings": {    
       "region" : "kr",    
       "endpoint" : "https://kr.object.private.ncloudstorage.com",
       "bucket": "estest",
       "compress": true,
       "base_path": "estest-1722213",
       "path_style_access": true
    }
    }
    
    • bucket: Name of the bucket where the snapshot to restore is stored.
    • base_path: Folder name where the snapshot is located (cluster-name-cluster-number).
  4. Run the following command to view the list of indices available for restoration in the snapshot.

    GET _snapshot/restore-repository/"snapshot name"
    
  5. Run the following command to restore a snapshot.

      POST _snapshot/restore-repository/"snapshot name"/_restore
      {
      "indices": "*",
      "ignore_unavailable": true
      }
    
    • Restore all indices.
    • The restore operation fails if duplicate indices already exist in the cluster.