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

Backup Import Between DCS Redis Instances

Updated on 2024-12-16 GMT+08:00

You can migrate data between DCS instances by importing backup files.

Notes and Constraints

To migrate to an instance with SSL enabled, disable the SSL setting first. For details, see Transmitting DCS Redis Data with Encryption Using SSL.

Prerequisites

  • You have successfully backed up the source Redis instance.
  • You have prepared the target Redis instance. If a target DCS Redis instance is not available, create one first. For details, see Buying a DCS Redis Instance.

    Redis is backward compatible. The target instance version must be the same as or later than the source instance version.

  • Ensure that the target Redis instance has sufficient storage space. You can clear the instance data before the migration. For details, see Clearing DCS Instance Data. If any data exists on the target instance, duplicate data between the source and target is overwritten. If the data exists only on the target instance, the data will be retained.

Importing Backup Data from a Redis Instance

  1. Log in to the DCS console.
  2. Click in the upper left corner of the console and select the region where your source and target instances are located.
  3. In the navigation pane, choose Data Migration. The migration task list is displayed.
  4. Click Create Backup Import Task.
  5. Enter the task name and description.

    The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).

  6. For source Redis, set Data Source to Redis.

    Figure 1 Selecting a data source (Redis)

  7. For Source Redis Instance, select the source instance to be migrated.
  8. You can specify Source DB to migrate data from the specified DB in the source Redis backup file. For example, if you enter 5, only data in DB5 will be migrated. To migrate all databases, do not specify Source DB.
  9. Enable Multi-DB Proxy Cluster if the source Redis is a multi-DB (multi-db set to yes) Proxy Cluster DCS Redis instance.
  10. Select the backup task whose data is to be migrated.
  11. For Target Redis Instance, select the DCS Redis instance prepared in Prerequisites.
  12. If the target Redis instance has a password, enter the password and click Test Connection to check whether the password is correct. If the instance is not password-protected, click Test Connection directly.
  13. For Target DB, you can specify a DB in the target Redis to migrate data to. For example, if you enter 5, data will be migrated to DB5 of the target Redis. If you do not specify a DB, data will be migrated to a DB corresponding to the source DB.

    NOTE:
    • If the source Redis is multi-DB and the target is single-DB (DB0), either ensure that all source data is in DB0, or specify a source DB and set the target DB to 0. Otherwise, migration will fail.
    • For details about DB in DCS for Redis, see Does DCS for Redis Support Multi-DB?

  14. Click Next.
  15. Confirm the migration task details and click Submit.

    Go back to the data migration task list. After the migration is successful, the task status changes to Successful.

Importing Backup Data from an OBS Bucket

Simply download the source Redis data and then upload the data to an OBS bucket in the same account and region as the target DCS Redis instance. After you have created a backup import task, data in the OBS bucket will be read and migrated to the target Redis.

NOTE:
  • .aof, .rdb, .zip, and .tar.gz files can be uploaded to OBS buckets. You can directly upload .aof and .rdb files or compress them into .zip or .tar.gz files before uploading.
  • To migrate data from a cluster Redis instance, download all backup files and upload all of them to the OBS bucket. Each backup file contains data for a shard of the instance. During the migration, you need to select backup files of all shards.
  1. Create an OBS bucket in the account and region where the target Redis instance is located. If a qualified OBS bucket is available, you do not need to create one.

    When creating an OBS bucket, pay attention to the configuration of the following parameters. For details on how to set other parameters, see Creating a Bucket.
    • Region:

      The OBS bucket must be in the same region as the target DCS Redis instance.

    • Default Storage Class: Select Standard or Infrequent Access.

      Do not select Archive. Otherwise, the migration will fail.

  2. Upload the backup file to the OBS bucket.

    1. In the bucket list, click the name of the created bucket.
    2. In the navigation pane, choose Objects.
    3. On the Objects tab page, click Upload Object.
    4. Specify Storage Class.

      Do not select Archive. Otherwise, the migration will fail.

    5. Upload the objects.

      Drag files or folders to the Upload Object area or click add file.

      A maximum of 100 files can be uploaded at a time. The total size cannot exceed 5 GB.

      Figure 2 Uploading an object
    6. Specify Server-Side Encryption. If you enable it, you can select SSE-KMS or SSE-OBS. You can also disable it. For details, see Server-Side Encryption.
    7. Click Upload.

  3. Click in the upper left corner and choose Distributed Cache Service for Redis under Middleware to open the DCS console.
  4. In the navigation pane, choose Data Migration.
  5. Click Create Backup Import Task.
  6. Enter the task name and description.

    The task name must start with a letter, contain 4 to 64 characters, and contain only letters, digits, hyphens (-), and underscores (_).

  7. In the Source Redis area, select OBS Bucket for Data Source and then select the OBS bucket to which you have uploaded backup files.

    Figure 3 Selecting a data source (OBS bucket)

  8. You can specify Source DB to migrate data from the specified DB in the source Redis backup file. For example, if you enter 5, only data in DB5 will be migrated. To migrate all databases, do not specify Source DB.
  9. Enable Multi-DB Proxy Cluster if the source Redis is a multi-DB (multi-db set to yes) Proxy Cluster DCS Redis instance.
  10. Click Add Backup and select the backup files to be migrated.
  11. In the Target Redis area, select the Target Redis Instance prepared in Prerequisites.
  12. If the target Redis instance has a password, enter the password and click Test Connection to check whether the password is correct. If the instance is not password-protected, click Test Connection directly.
  13. For Target DB, you can specify a DB in the target Redis to migrate data to. For example, if you enter 5, data will be migrated to DB5 of the target Redis. If you do not specify a DB, data will be migrated to a DB corresponding to the source DB.

    NOTE:
    • If the source Redis is multi-DB and the target is single-DB (DB0), either ensure that all source data is in DB0, or specify a source DB and set the target DB to 0. Otherwise, migration will fail.
    • For details about DB in DCS for Redis, see Does DCS for Redis Support Multi-DB?

  14. Click Next.
  15. Confirm the migration task details and click Submit.

    Go back to the data migration task list. After the migration is successful, the task status changes to Successful.

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