×
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.

Prerequisites

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.

1

In the DBS Console, click Create Schedule

2

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

3

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.

4

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

5

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

6

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

7

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

8

Click Select All to move all tables into selected list.

9

Click Next to move to configure backup time screen

10

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

11

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

12

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

13

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

14

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.

15

16

Click Backup Full Data to see the running task process.

17

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

18

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

19

Performing Database Restore

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

20

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.

21

22

Click Next to proceed to the next step.

23

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.

24

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

25

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.

26

27

28

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.

29

30

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

1,910 posts | 411 followers

You may also like

Comments

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.