Database Backup (DBS) allows you to back up user-created databases and restore the backup data to ApsaraDB databases. DBS supports a variety of databases, such as MySQL, SQL Server, PostgreSQL, Oracle, Redis, and MongoDB databases. This topic describes how to back up a user-created Redis database and restore the backup data to an ApsaraDB for Redis database.
|Parallel processing||DBS supports a write capability of more than 150,000 transactions per second (TPS). Compared with redis-port, DBS provides a more than five times faster restore speed.||View details|
|Single-database restoration||DBS allows you to restore a single Redis database without restoring the entire Redis instance. This shortens the restore process.||View details|
|Fine-grained backup||DBS allows you to back up a single Redis database, multiple Redis databases at a time, or the entire Redis instance.||View details|
|Backup speed limit||DBS allows you to limit the backup speed to significantly reduce the negative impact of backup operations on the performance of the database.||View details|
|Automatic storage classification||DBS allows you to customize transfer and deletion rules for backup sets.||View details|
|Backup source change||DBS allows you to change the backup source of a backup schedule from a user-created Redis database to an ApsaraDB for Redis database.||View details|
This topic describes how to back up a user-created Redis database and restore the backup data to an ApsaraDB for Redis database in three steps. You can follow the procedure based on your needs.
(1) Create a DBS backup schedule
Go to the DBS purchase page and purchase a DBS backup schedule with the database type set to Redis.
(2) Configure the DBS backup scheduleGo to the DBS console. In the left-side navigation pane, click Backup Schedules. On the Backup Schedules page that appears, click Configure Backup Schedule in the Actions column of the created backup schedule.
(3) Configure the backup source
In the Configure Backup Schedule wizard, set Database Location to ECS-Hosted Database.
DBS allows you to back up and restore the following types of databases:
- User-created databases connected to Alibaba Cloud through IP addresses and port numbers
- User-created databases hosted on Elastic Compute Service (ECS) instances
- ApsaraDB for Redis databases
- User-created databases connected to Alibaba Cloud over Express Connect, VPN Gateway, or Smart Access Gateway
(4) Configure the backup destination
The backup destination is an Object Storage Service (OSS) bucket. DBS automatically generates the name of the OSS bucket. You can also enter a custom OSS bucket name.
(5) Select backup objectsDBS allows you to back up a single Redis database, multiple Redis databases at a time, or the entire Redis instance.
(6) Specify the backup time
DBS supports periodic backup and one-time backup. You can specify when to back up your database. You can back up your database on a weekly basis and at a specific time based on your business requirements. For example, you can perform a full backup at 03:00 during off-peak hours of your business. For databases that do not support incremental backup, the real-time transaction log backup feature is disabled and the options are dimmed.
To reduce the negative impact of backup operations on the performance of the database, DBS allows you to set the maximum number of concurrent threads and the highest speed allowed for full backup to limit the backup speed.
- Maximum Concurrent Threads for Full Data Backup: the maximum number of concurrent threads allowed for full backup. A smaller value indicates a lower backup speed and a smaller impact on the performance of the source database.
- Maximum Speed for Full Data Backup: the highest speed allowed for full backup. You can precisely control the speed of full backup to effectively reduce the negative impact of backup operations on single-thread performance of the Redis database.
(7) Configure the lifecycle of backup sets
DBS allows you to manage the lifecycle of backup sets stored in OSS to reduce storage costs. You can configure transfer and deletion policies for all backup sets stored in OSS. As shown in the following figure, the maximum retention period of a full backup set is 730 days. The backup set will be deleted after it is stored for 730 days. A newly created backup set is first stored in OSS Standard storage for 180 days, and then transferred to OSS Infrequent Access (IA) storage. After another 365 days, the backup set is transferred to OSS Archive storage.
(1) Restore the databaseAfter you back up the user-created Redis database, you can restore the backup data to an ApsaraDB for Redis database.
(2) Specify the time point to restoreDBS displays the time points to which the database can be restored in a calendar. You can quickly specify the time point to which the database will be restored.
(3) Configure the destination databaseIn this example, set Database Location to ApsaraDB for Redis.
(4) Select objects to restoreDBS allows you to only restore the selected single Redis database instead of the entire Redis instance. This significantly reduces the data to be restored and the recovery time objective (RTO).
(5) Start the restore taskDBS uses the parallel and batch processing technologies to restore the backup data. In core Redis scenarios where the average key size is 1 KB, the data is written at 150,000 TPS. Considering the network bandwidth limit of the destination Redis database, the restore speed can reach 50 Mbit/s.
You can change the backup source from the user-created Redis database to an ApsaraDB for Redis database without releasing the backup schedule. This allows you to use more features such as data archiving and remote backup.
(1) Click Edit Backup Source.
(2) Set Database Location to ApsaraDB for Redis.
Database backup is fundamental to database O&M and requires long-term and stable operation. We recommend that you purchase DBS backup schedules that use the subscription billing method.
DBS provides the following schemes to meet different database management requirements on the cloud:
- Cloud disaster recovery: You can use DBS to back up a database in an on-premises data center to Alibaba Cloud so that you can restore the backup data to a database in an on-premises data center or an ApsaraDB database.
- Hybrid cloud backup: You can use DBS to back up both databases in on-premises data centers and ApsaraDB databases in a uniform manner.
- Alibaba Cloud backup: You can use DBS to back up ApsaraDB databases so that you can use advanced features such as remote backup, long-term archiving, and real-time backup.