Database Backup (DBS) provides a variety of features such as single-table restoration, geo-redundancy, full backup, incremental backup, and long-term archiving to back up and restore Redis instances.

Features

Feature Description
SQL file backup DBS logically backs up data in the JSON format.
Geo-redundancy DBS can back up a Redis instance to an Object Storage Service (OSS) bucket that is created in the destination region. DBS allows you to restore the backup data to a Redis instance in the source, the destination, or a different region.
Long-term archiving DBS can retain your backup data for up to five years. After five years, DBS transfers backup sets to Archive Storage.
Fine-grained backup DBS allows you to back up a single table, a single database, multiple databases, or an entire Redis instance.
Backup speed limit Database Backup allows you to limit the backup speed to reduce the negative impact of backup operations on database performance.
Single-table restoration DBS allows you to restore a single table without the need to restore the entire Redis instance. This way, the restoration time is reduced.

Create a backup schedule

For more information, see Purchase a backup schedule.

Note When you purchase a backup schedule, set Database Type to Redis and set Backup Method.

Configure the backup schedule

  1. Log on to the DBS console.
  2. In the left-side navigation pane, click Backup Schedules. On the Backup Schedules page, select a region in the upper-left corner.
  3. On the Backup Schedules page, click Configure Backup Schedule in the Actions column corresponding to the backup schedule that you purchased.
  4. In the Configure Backup Source and Destination step of the Configure Backup Schedule wizard, set the parameters as described in the following table to configure the backup source and destination.
    Table 1. Database parameters
    Section Parameter Description
    N/A Schedule Name The name of the backup schedule. Database Backup generates a backup schedule name. We recommend that you set a descriptive name that makes the backup schedule easy to identify. Backup schedule names do not have to be unique.
    Backup Source Information Backup Mode

    The method used to back up data. By default, the backup method that you selected when you purchased the backup schedule is used.

    Database Location The location of the database that you want to back up. Valid values:
    • ApsaraDB for Redis
    • User-Created Database with Public IP Address <IP Address:Port Number>
    • ECS-Hosted Database
    • Express Connect DB/VPN Gateway/Intelligent Gateway
    • No public network IP: Port's self-built database (accessed through the database gateway)
    Note In this example, select ApsaraDB for Redis. If you select other location types, you must set more parameters. For more information, see Table 2.
    Instance Region This parameter is available only when you set the Database Location parameter to ECS-Hosted Database, ApsaraDB for Redis, or No public network IP: Port's self-built database (accessed through the database gateway).
    Database Type

    This parameter is set to Redis by default.

    Redis Instance ID The ID of the source ApsaraDB for Redis instance.

    This parameter is available only when you select ApsaraDB for Redis for the Database Type parameter.

    Password The password of the account used to connect to the database that you want to back up. After you enter the username and password of the database account, click Test Connection next to the password to check whether the information of the database that you want to back up is correct. If the specified parameters are valid, the Test Passed message appears. If the Test Failed message appears, click Check next to Test Failed. Modify the information about the instance that you want to back up based on the check results.
    Backup Destination Information Backup Storage Type The type of storage used to back up data. Valid values:
    • DBS built-in storage (recommended)
    • OSS For User
    Note In this example, select DBS built-in storage (recommended). If you select OSS for user, you must set the OSS Bucket Name parameter.
    Storage Encryption The method used to encrypt the backup data. Valid values:
    • Encrypted (recommended): The backup data is encrypted.

      The server-side encryption feature of Object Storage Service (OSS) is used. When you upload an object to OSS, OSS encrypts and stores the object. When you download the encrypted object from OSS, OSS decrypts the object and returns the decrypted object to you. For more information, see Server-side encryption.

    • Non-encrypted: The backup data is not encrypted.
    OSS Bucket Name

    This parameter is valid only when you set the Backup Storage Type parameter to OSS for user.

    Table 2. Other parameters
    Section Parameter Description
    Backup Source Information ECS Instance ID This parameter is available when you set the Database Location parameter to ECS-Hosted Database.
    Gateway instance ID This parameter is available when you set the Database Location parameter to No public network IP: Port's self-built database (accessed through the database gateway).
    Address

    This parameter is available only when you set the Database Location parameter to No public network IP: Port's self-built database (accessed through the database gateway), Express Connect DB/VPN Gateway/Intelligent Gateway, or User-Created Database with Public IP Address <IP Address:Port Number>.

    Port Number This parameter is available when the Address parameter is available. This parameter is set to 6379 by default.
    Peer VPC This parameter is available when you set the Database Location parameter to Express Connect DB/VPN Gateway/Intelligent Gateway.
  5. In the Edit Backup Objects step, find the database or table that you want to back up in the Available section. Click the right arrow to add the selected database or table to the Selected section. Then, click Next.
    Note If you back up an entire database, the permission data and stored procedures are also backed up.
  6. In the Configure Backup Time step, set the parameters as described in the following table and click Next.
    Parameter Description
    Full-scale Backup Frequency The frequency of the backup schedule. Valid values: Periodic Backup and Single Backup.
    Note If you select Periodic Backup, you must set the Full Data Backup Recurrence and Full Data Backup Start At parameters.
    Full Data Backup Recurrence The days of the week on which DBS runs the backup schedule.
    Start At The start time of the backup.
    Note If the time required to complete a full data backup is longer than the backup interval, DBS skips the next backup.
    Real-Time Transaction Log Backup Specifies whether to enable incremental backup.
    Maximum Concurrent Threads for Full Data Backup The maximum number of concurrent threads available for a full data backup.
    Note The maximum number of actual concurrent threads varies based on backup schedule specifications.
    Maximum Speed for Full Data Backup

    The maximum speed of a full data backup.

  7. In the Edit Lifecycle step, configure the lifecycle for a full data backup in the Configure Full Data Backup Lifecycle section.
    Note If you select Enable for the Real-Time Transaction Log Backup parameter, you must configure the backup time for incremental backup data.
  8. After the configuration is complete, click Precheck in the lower-right corner of the page.
  9. If the Precheck Passed message appears, click Start Task.
    Note When the state of the backup schedule changes to Running, the backup schedule takes effect. You can view the backup task on the Backup Schedules page. For more information, see View backup schedules.

What to do next

Restore a database