Backup files of ApsaraDB for Redis are retained for seven days free of charge. If you want to retain backup files for more than seven days due to regulatory or security requirements, you can download the backup files to your on-premises machine. You can also restore downloaded backup files to a self-managed database. This way, you can perform data analytics or run tests by using the self-managed database.

Prerequisites

The instance is an instance of ApsaraDB for Redis Community Edition or a performance-enhanced or hybrid-storage instance of ApsaraDB for Redis Enhanced Edition (Tair). For more information about instances of ApsaraDB for Redis Enhanced Edition (Tair), see Performance-enhanced instances and Persistent memory-optimized instances.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. In the top navigation bar of the page, select the region where the instance is deployed.
  3. On the Instances page, click the ID of the instance.
  4. In the left-side navigation pane, click Backup and Recovery.
  5. Find the backup file that you want to download and click Download Backups in the Actions column.
    Figure 1. Download a backup file
    Download a backup file
    Note If the instance is a cluster instance or read/write splitting instance, you must download a backup file of each data node in the instance to ensure data consistency.
  6. In the dialog box that appears, perform one of the operations that are described in the following table.
    Operation Description
    Download the backup file over the Internet
    1. Click Get URL for Internet.
    2. Paste the URL into the address bar of a browser and press Enter. The browser automatically downloads the backup file.
    Download the backup file over an internal network. For example, download the backup file on an Elastic Compute Service (ECS) instance.
    1. Click Get URL for Intranet.
    2. Select a download method based on the operating system of the client.
      • Windows: Paste the URL into the address bar of a browser and press Enter. The browser automatically downloads the backup file.
      • Linux: Run the following command in the specified format:
        wget -c '<URL that is used to download the backup file over the internal network>' -O <Name of the downloaded backup file>.<The extension that is added to the name of the downloaded backup file>

        Example:

        wget -c 'http://rds****.oss-cn-hangzhou-internal.aliyuncs.com/custins416****/hins1****.rdb?...' -O backupfile.rdb
    Note If you download the backup file on an ECS instance, the ECS instance and the ApsaraDB for Redis instance can be deployed in networks of different types.

What to do next

After the backup file is downloaded, you can restore the downloaded backup file to a self-managed database. This way, you can perform data analytics or run tests by using the self-managed database. For more information, see Use redis-shake to restore data.

Related operations

Operation Description
DescribeBackups Queries information about the backup files of an ApsaraDB for Redis instance.