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
Help Center/ GeminiDB/ GeminiDB Redis API/ Working with GeminiDB Redis API/ Data Migration/ Using Redis-Shake to Import an RDB or AOF File to a GeminiDB Redis Instance

Using Redis-Shake to Import an RDB or AOF File to a GeminiDB Redis Instance

Updated on 2025-01-24 GMT+08:00

Importing an RDB File to a GeminiDB Redis Instance

  1. Deploy the required migration tool.

    1. Obtain Redis-Shake.
      NOTE:

      Download the Redis-Shake release package and decompress it.

    2. Modify the Redis-Shake.conf configuration file and configuring the following items:

      log.level = info #Default log level. A printed INFO log contains migration progress information, based on which you can judge whether the migration is complete.

      source.rdb.input = /xx/xx.rdb # Absolute path of the source RDB file

      target.address = <host>:6379 # Destination instance IP address

      target.password_raw = ***** # Password for logging in to a destination instance

      target.version = 5.0 # Version of the destination Redis instance

      target.type = standalone # Destination instance type

      target.db = -1 # Specific database on the destination that all data will be migrated to. If this parameter is set to -1, a mapping relationship is established between migrated databases and databases in the source instance.

      target.dbmap = #Configure the database migration mapping. The value of target.db must be -1, for example, 0-5. 1-3 indicates that data in source database db0 will be written to destination database db5 and data in source database db1 will be written to destination database db3.

      big_key_threshold = 52428800 # Big key threshold. If the number of value bytes corresponding to a key exceeds the threshold, data is written in batches.

      resume_from_break_point = false #Disable resumable download. This function is unavailable.

    3. Specify whether data of the destination is overwritten.

      key_exists = none

      NOTE:

      If there are duplicate keys on the source and destination, specify whether data of the destination is overwritten. The options are as follows:

      • rewrite indicates that the source overwrites the destination.
      • none indicates that the migration process exists once duplicate keys are detected.
      • ignore indicates that keys in the source are retained and keys in the destination are ignored. This value does not take effect in rump mode.

      none is recommended. There will be no duplicate data because the source is an RDB file. If the migration exits unexpectedly, you can choose Service Tickets > Create Service Ticket in the upper right corner of the console and contact customer service.

  2. Migrate data.

    Migration starting command:

    ./redis-shake.linux -conf=redis-shake.conf -type=restore

    NOTE:

    Use the restore mode because the source is an RDB file.

    Stop the migration process after the migration is complete.

  3. Verify data.

    Data is obtained from the RDB file. Therefore, you need to check the GeminiDB Redis data at the destination end from the service perspective.

Importing the AOF File To GeminiDB Redis

  1. Upload the generated AOF file to an ECS.
  2. Start the open-source Redis 5.0 single-node process on the ECS to load the AOF file and wait till the process is started. Ensure that the startup directory of the open-source Redis is the same as the directory containing the AOF file.
  3. Run the SAVE command to generate an RDB file. Place the RDB file in the startup directory of the open-source Redis.
  4. Stop the open-source Redis 5.0 process.
  5. Perform the migration by following Importing an RDB File to a GeminiDB Redis Instance.

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