Help Center/ Distributed Cache Service/ FAQs/ Data Backup, Export, and Migration/ How Do I Export DCS Redis Instance Data?
Updated on 2024-09-24 GMT+08:00

How Do I Export DCS Redis Instance Data?

  • Instance data of DCS instances other than single-node ones can be exported on the console:
    1. Go to the Cache Manager page on the DCS console.
    2. Click the name of the desired instance. The instance details page is displayed.
    3. Choose Backups & Restorations.
    4. If No records found is displayed, perform a backup and click Download.

    If your DCS instances were created a long time ago, the versions of these instances may not be advanced enough to support some new functions (such as backup and restoration). You can contact technical support to upgrade your DCS instances. After the upgrade, you can back up and restore your instances.

  • Single-node instances do not support the backup function. You can use command SYNC on redis-cli to export data to RDB files.
    • If the instance allows the SYNC command (such as a Redis 3.0 single-node instance), run the following command to export the instance data:

      redis-cli -h {source_redis_address} -p 6379 [-a password] --rdb {output.rdb}

    • If the instance does not allow the SYNC command (such as a Redis 4.0/5.0/6.0 single-node instance), migrate the instance data to a master/standby instance and export the data by using the backup and restoration functions on the console.