- Print
- PDF
Search Engine Service migration
- Print
- PDF
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:
- Complete the following jobs for clusters in a classic environment.
- Set up Kibana access and check access information (refer to Access to Kibana)
- Install the Object Storage Plugin on all nodes in the cluster (refer to Install Object Storage Plugin)
- Create an Elasticsearch or OpenSearch cluster in a VPC environment (refer to Create cluster).
- Complete the following jobs for the cluster (VPC) that was created.
- Set up access to Kibana or OpenSearch Dashboards and check access information (refer to Use Kibana and OpenSearch Dashboards)
- Set up API authentication key (refer to Setting up API authentication key)
2. Create cluster (Classic) snapshots
It creates a snapshot of the cluster in the classic environment.
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).
Access Kibana installed on the cluster where you want to create a snapshot.
Click the Dev Tools menu.
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 nameaccess_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.
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.
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):
Access Kibana or OpenSearch Dashboards installed in the cluster.
Select the Dev Tools menu from Kibana or OpenSearch Dashboards.
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 existsbase_path
: name of the folder where the snapshot to be restored is located (cluster name- cluster number
)
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"
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.