Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Migrating Cluster Data Through Backup and Restoration

Updated on 2023-06-20 GMT+08:00
  • To migrate data between Elasticsearch clusters, follow the instructions in Migrating Cluster Data .
  • To migrate data from a user-built or third-party Elasticsearch cluster to a Elasticsearch cluster, perform the steps in this section.

Prerequisites

  • Before using backup and restoration, ensure that:
    • Target Elasticsearch version ≥ Source Elasticsearch version
    • Number of candidate master nodes of the target Elasticsearch cluster > Half of the number of candidate master nodes of the source Elasticsearch cluster
  • Backup and restoration do not support incremental data synchronization. You need to stop data update before backing up data.
  • The target Elasticsearch cluster has been created in CSS.

Migration Process

The following figure shows the cluster migration process when the source is a user-built or third-party Elasticsearch cluster, and the target is an Elasticsearch cluster of CSS.

Figure 1 Migration through backup and restoration

Procedure

  1. Create a shared repository that supports the S3 protocol, for example.
  2. Create a snapshot backup repository in the user-built or third-party Elasticsearch cluster to store Elasticsearch snapshot data.

    For example, create a backup repository named my_backup in Elasticsearch and associate it with the repository OSS.

    PUT _snapshot/my_backup
        {
            # Repository type.
    	"type": "oss",
            "settings": {
    		# # Private network domain name of the repository in step 1.
    		"endpoint": "http://oss-xxx.xxx.com", 
    		# User ID and password of the repository.
    		"access_key_id": "xxx",
    		"secret_access_key": "xxx",
    		# Bucket name of the repository created in step 1.
    		"bucket": "patent-esbak", 
    		# # Whether to enable snapshot file compression.
    		"compress": false,
    		# If the size of the uploaded snapshot data exceeds the value of this parameter, the data will be uploaded as blocks to the repository.
    		"chunk_size": "1g",
    		# Start position of the repository. The default value is the root directory.
    		"base_path": "snapshot/"
            }
    }

  3. Create a snapshot for the user-built or third-party Elasticsearch cluster.

    • Create a snapshot for all indexes.

      For example, create a snapshot named snapshot_1.

      PUT _snapshot/my_backup/snapshot_1?wait_for_completion=true
    • Create a snapshot for specified indexes.

      For example, create a snapshot named snapshot_test that contains indexes patent_analyse and patent.

      PUT _snapshot/my_backup/snapshot_test
      {
      "indices": "patent_analyse,patent"
      }

  4. View the snapshot creation progress of the cluster.

    • Run the following command to view information about all snapshots:
      GET _snapshot/my_backup/_all
    • Run the following command to view information about snapshot_1:
      GET _snapshot/my_backup/snapshot_1

  5. Migrate snapshot data from the repository to OBS.

    The Object Storage Migration Service (OMS) supports data migration from multiple cloud vendors to OBS.

  6. Create a repository in the Elasticsearch cluster of CSS and associate it with OBS. This repository will be used for restoring the snapshot data of the user-built or third-party Elasticsearch cluster.

    For example, create a repository named my_backup_all in the cluster and associate it with the destination OBS.

    PUT _snapshot/my_backup_all/
    {
        "type" : "obs",
        "settings" : {
    		# Private network domain name of OBS
    		"endpoint" : "obs.xxx.xxx.com",
    		"region" : "xxx",
    		# Username and password for accessing OBS
    		"access_key": "xxx",
    		"secret_key": "xxx",  
    		# OBS bucket name, which must be the same as the destination OBS bucket name in the previous step
    		"bucket" : "esbak",   
    		"compress" : "false",
    		"chunk_size" : "1g",
    		#Note that there is no slash (/) after snapshot.
    		"base_path" : "snapshot",
    		"max_restore_bytes_per_sec": "100mb",
    		"max_snapshot_bytes_per_sec": "100mb"    
    	}
    }

  7. Restore the snapshot data to the Elasticsearch cluster of CSS.

    1. Check information about all snapshots.
      GET _snapshot
    2. Restore a snapshot
      • Restore all the indexes from a snapshot. For example, to restore all the indexes from snapshot_1, run the following command:
        POST _snapshot/my_backup_all/snapshot_1/_restore?wait_for_completion=true
      • Restores some indexes from a snapshot. For example, in the snapshot named snapshot_1, restore only the indexes that do not start with a period (.).
        POST _snapshot/my_backup/snapshot_1/_restore
        {"indices":"*,-.monitoring*,-.security*,-.kibana*","ignore_unavailable":"true"}
      • Restore a specified index from a snapshot and renames the index. For example, in snapshot_1, restore index_1 to restored_index_1 and index_2 to restored_index_2.
        POST /_snapshot/my_backup/snapshot_1/_restore
        {
        	# Restore only indexes index_1 and index_2 and ignore other indexes in the snapshot.
        	"indices": "index_1,index_2"
        	# Search for the index that is being restored. The index name must match the provided template.
        	"rename_pattern": "index_(.+)",
        	# Rename the found index.
        	"rename_replacement": "restored_index_$1"
        }

  8. View the snapshot restoration result.

    • Run the following command to view the restoration results of all snapshots:
      GET /_recovery/
    • Run the following command to check the snapshot restoration result of a specified index:
       GET {index_name}/_recovery

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback