Community Blog Backing Up and Restoring Databases with Alibaba Cloud Database Backup Service

Backing Up and Restoring Databases with Alibaba Cloud Database Backup Service

In this article, we will show you how to use the new Database Backup Service to perform database backup and restoration on Alibaba Cloud.

By Kenny Lai, Solutions Architect

Alibaba Cloud Database Backup Service (DBS) is a secure and cost-efficient solution for continuous data protection. The service offers strong protection for data stored in multiple environments, such as enterprise data centers, hybrid clouds, public clouds, and third-party cloud vendors.

In this article, we will show you how to make use of the new Database Backup Service to perform database backup and restore process.


You'll need a workable database instance to use DBS. Your database instance can be an Elastic Compute Service (ECS) based database, an ApsaraDB for RDS instance, or even an on-premises or publicly accessible database instance. DBS Currently support MySQL, MongoDB, Oracle, and SQL Server database management systems.

Setting Up Backup Task

Locate Database Backup Service on your Alibaba Cloud console.


In the DBS Console, click Create Schedule


Select your preferred DBS Region, Database Type, Specification and Duration.


After confirming your selections, click Buy Now. Go back to the Database Backup Console and click on Backup Schedules. You will see an un-configured DBS instance listed.


Click Configure Backup and you will see the DBS configuration page.


Fill in all the necessary information including database location, database type, address, port, database account, password, and SSL encryption preferences. Optionally, you can test the connection and make sure the data you entered is correct. If your database is set behind a firewall, make use click the Set Whitelist to see the list of IP range needed to be whitelist so that DBS is able to reach your database.

In this example, we prepared a MySQL server running in ECS, so we select ECS-Hosted Database as the database location and we can locate the ECS instance ID via the dropdown list


He have configured our backup location to an OSS Bucket in Hong Kong.


Click Next and you will move to next step, which is to select the desired table/database needed to be included in the backup.


Click Select All to move all tables into selected list.


Click Next to move to configure backup time screen


DBS supports Single Backup or Periodic Backup modes. In this example, we have selected Single Backup.


Click Next to continue. Finally, we need to configure the backup retention policy.


Save the configuration and return to Backup Schedules page. To start the backup process, click Start to start the process.


When DBS begins the backup process, it will perform a pre-check first.


If there are no errors, click Start Task to execute the backup. The task will switch from "not started" to "running" status on your console. You can get an overview of the selected running task by clicking on Manage.



Click Backup Full Data to see the running task process.


Wait until the status changes to "Completed". Once you see the Completed status, the backup is done.


You can click on View Backup Set to see the data that was backed up to OSS bucket.


Performing Database Restore

To Perform Database Restore, select the backup data to be used and select Restore Database.


We will see the Create Restore Task page. In this page, we need to define which restoration point to roll back to and the destination database information.



Click Next to proceed to the next step.


In the "Objects to Restore" step, you will first need to choose a conflict resolution option. You can choose to ask DBS to rename the existing database or fail when database table already exists. In this example, we have chosen to rename Object with the Same Name as we try to restore the backup into the source database.


Next, select the desired tables to restore. Once complete, click Pre-check to check if the database connection is fine or not.


DBS will check if the restoration task dependencies are met. If all statuses say "Successful", click Start Task to begin the database restoration.

Task status will change from Initializing to Running to Completed. Wait until the task is completed.




To view the details of the database restoration task, click on the task ID and click on Restore Schema. It will show the Create table DDL it executed. To view the number of rows restored, click Restore Full Data.



That's it! Now you know how to use DBS to back up and restore your database.

To learn more about Alibaba Cloud Database Backup Service, visit https://www.alibabacloud.com/products/database-backup

1 1 1
Share on

Alibaba Clouder

2,600 posts | 751 followers

You may also like


Raja_KT February 9, 2019 at 5:47 am

Great one. It gives us a GUI with many options and Precheck screen of what are ready.