Search Engine Service migration
    • PDF

    Search Engine Service migration

    • PDF

    Article Summary

    Available in Classic and VPC

    You can migrate data from an Elasticsearch cluster created by the Search Engine Service in a classic environment to an Elasticsearch or OpenSearch cluster in a VPC environment. Proceed with the following steps in order for migrating data.

    1. Preparations for data migration
    2. Create cluster (Classic) snapshots
    3. Restore snapshots to cluster (VPC)

    1. Preparations for data migration

    The following is how to proceed with the preparations for data migration:

    1. Complete the following jobs for clusters in a classic environment.
    2. Create an Elasticsearch or OpenSearch cluster in a VPC environment (refer to Create cluster).
    3. Complete the following jobs for the cluster (VPC) that was created.

    2. Create cluster (Classic) snapshots

    It creates a snapshot of the cluster in the classic environment.

    Note

    This briefly explains how to create a snapshot. For more information, see Create snapshots through Elasticsearch API.

    The following describes how to create a snapshot of a cluster (Classic).

    1. Access Kibana installed on the cluster where you want to create a snapshot.

    2. Click the Dev Tools menu.

    3. In the Console, execute 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 save the snapshot",
               "path_style_access": "true",
               "access_key":"Value of access key ID",
               "secret_key":"Value of secret key"
            }
      }
      
      • my-own-snapshot-repository: enter the desired repository name
      • access_key, secret_key: API authentication key value. You can create and check it in the My page > Manage account > Manage authentication keys menu of the NAVER Cloud platform portal.
    4. In the Console, execute the following command to create a snapshot.

      PUT _snapshot/my-own-snapshot-repository/my-own-snapshot-name
      {
      "indices": "*,-.kibana*"
      }
      
      • It creates a snapshot of all indexes excluding those related to Kibana.
      • When creating a snapshot including indexes related to Kibana, you must exclude indexes related to Kibana when restoring the snapshot.

    3. Restore snapshots to cluster (VPC)

    It restores data to a cluster in a VPC environment using the snapshot you created.

    Note

    This briefly explains how to restore a snapshot. For more information, see Restore snapshot.

    The following describes how to restore a snapshot to a cluster (VPC):

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

    2. Select the Dev Tools menu from Kibana or OpenSearch Dashboards.

    3. In the Console, execute 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 be restored exists
      • base_path: name of the folder where the snapshot to be restored is located (cluster name- cluster number)
    4. Execute the following command to check the list of indexes that can be restored and exist in the snapshot.

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

        POST _snapshot/restore-repository/"Snapshot name"/_restore
        {
        "indices": "*",
        "ignore_unavailable": true
        }
      
      • It restores for all indexes.
      • Restore will fail if a duplicate index already exists in the cluster.

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.