Updated on 2024-03-04 GMT+08:00

Downloading an RDB or AOF Backup File

Automatically backed up data can be retained for a maximum of 7 days. Manually backed up data is not free of charge and takes space in OBS. Due to these limitations, you are advised to download the RDB and AOF backup files and permanently save them on the local host.

This function is supported only by master/standby, read/write splitting, and cluster instances, and not by single-node instances. To export the data of a single-node instance to an RDB file, you can use redis-cli. For details, see How Do I Export DCS Redis Instance Data?

To export the data of a master/standby, read/write splitting, or cluster instance, do as follows:

  • Redis 3.0: Export the instance data to AOF files by using the DCS console, or to RDB files by running the redis-cli -h {redis_address} -p 6379 [-a {password}] --rdb {output.rdb} command by using redis-cli.

    DCS for Redis 3.0 is no longer provided. You can use DCS for Redis 4.0 or later instead.

  • Redis 4.0 and later: Export the instance data to AOF or RDB files by using the DCS console.

Prerequisites

The instance has been backed up and the backup is still valid.

Procedure

  1. Log in to the DCS console.
  2. Click in the upper left corner of the management console and select the region where your instance is located.
  3. In the navigation pane, choose Cache Manager.

    Filter DCS instances to find the desired DCS instance.

  4. Click the name of the DCS instance to display more details about the DCS instance.
  5. On the instance details page, click Backups & Restorations.

    A list of historical backup tasks is then displayed.

  6. Click Download in the row containing the chosen backup task.
  7. In the displayed, Download Backup File dialog box, select either of the following two download methods.

    Download methods:
    • By URL
      1. Set the URL validity period and click Query.
      2. Enter URLs in the address bar of the browser or click Download to download files.

        If you choose to copy URLs, use quotation marks to quote the URLs when running the wget command in Linux. For example:

        wget 'https://obsEndpoint.com:443/redisdemo.rdb?parm01=value01&parm02=value02'

        This is because the URL contains the special character and (&), which will confuse the wget command. Quoting the URL facilitates URL identification.

    • By OBS

      Follow the displayed procedure.

(Optional) Enabling Critical Operation Protection

Downloading backup files is a critical operation that can be protected. After operation protection is enabled, a verification code will be needed to download backup files, improving data security.

  • An administrator can configure critical operation protection, and IAM users can only view the configurations. If an IAM user needs to modify the configurations, the user can request the administrator to perform the modification or grant the required permissions.
  • For more information about critical operations, see Critical Operation Protection.
  1. On the management console, hover over the username in the upper right corner, and choose Security Settings from the drop-down list.
  2. On the Security Settings page, click the Critical Operations tab.
  3. Click Enable next to Operation Protection to enable operation protection.
  4. After operation protection is enabled, the Confirm dialog box is displayed when you download DCS backup files. You can download backup files only after identity authentication is complete.

    Figure 1 Confirm