Restoring a Database Using a Temporary Instance

简介: Learn how to restore a database effectively using a temporary instance on Alibaba Cloud ApsaraDB for RDS.

In the era of Big Data, data backup has become an integral part in maintaining the continuity of businesses. However, data that has been backed up may still be lost in actual operations due to misoperations or other unforeseen reasons. Losing data can be costly for an enterprise, especially if its core business relies heavily on data intelligence.

To minimize the possibility of data loss, businesses should consider using enterprise-level databases, such as the Alibaba Cloud ApsaraDB for RDS. With its automated monitoring and data recovery capabilities, ApsaraDB for RDS provides a very stable data backup mechanism for enterprises.

When you experience data loss while using an ApsaraDB for RDS instance, you can use the backup and recovery feature to undo any misoperations. ApsaraDB for RDS provides two methods for you to restore your data: recovery directly to the master database and recovery through a temporary instance.

You are not recommended to use a direct restoration unless you are certain that the data in the backup is sufficient to meet your requirements. Once completed, you will not be able to undo the changes to your database. Instead, you should perform data restoration through a temporary instance. By creating a temporary instance to restore database to a time point, you can perform multiple tests on the temporary instance to ensure everything is correct.

There are two common scenarios of data restoration on ApsaraDB for RDS:

Scenario 1

The data at the backup time point is able to meet business requirements. In other words, data at that backup time point can be directly used to overwrite the target database (or the target table).

Step 1: Go to the RDS Console and navigate to the Backup and Recovery section.

1

Step 2: Go to the Temporary Instance tab. Specify the time point and click on Create Temporary Instance.

2

There are two conditions for successfully creating a temporary instance:

  • There is an existing full backup before the data loss.
  • No instance restoration operations (overwriting restoration) are performed after the specified time point.

You can see the progress of the task (written in red) next to the database instance name:

3

Note: Creating a temporary instance may take a while if the instance data size is large.

Step 3: After the task is completed, refresh the page.

4

If the data at the time point can meet business requirements, you can proceed by clicking on the Migrate Temporary Instance to Master Instance Database button. Data from the temporary instance will be transferred to the master instance via the Data Transmission Service (DTS) tool. You can safely ignore the following steps (Step 4 and its subsequent steps).

Scenario 2

In the previous scenario, normal incremental data after the time point is discarded. However, sometimes we need to save the data after the backup time point.

To do this, perform the first three steps in Scenario 1. After the temporary instance is successfully created, we need to restore the deleted records.

Step 4: Check the temporary database information.

5

Step 5: Select the desired database for logon, and log on to the temporary instance through a database client. In this example, we have performed this step with MySQL Front.

6

Step 6: Retrieve the data that was accidentally deleted through the SQL window.

7

Step 7: Import the exported SQL to the master instance through MySQL Front or other tools to complete data restoration.

That's it! Database backup and recovery is for enterprise is made quick and convenient with Alibaba Cloud ApsaraDB for RDS and Data Transmission Service. Visit the ApsaraDB for RDS documentation page to learn more about backing up data, or talk to our database experts by visiting this link.

目录
相关文章
|
5月前
h2database
h2database
30 0
|
数据库
Duplicating a Database
Duplicating a Database
159 0
Duplicating a Database
|
SQL 存储 运维
我们在讲的 Database Plus,到底能解决什么样的问题?
一直以来,大一统还是碎片化,是数据库发展趋势的两种最主流预测。随着数字化进程的推进,单一场景无法满足应用多样化的需求,数据库碎片化已呈不可逆的趋势。在当前,市场占有率最高的商用数据库—— Oracle 并没有明显短板的情况下,各种全新的数据库依旧如雨后春笋般层出不穷。如今,DB-Engines 上已有超过 300 余种数据库参与排名。
146 0
我们在讲的 Database Plus,到底能解决什么样的问题?
|
Java 关系型数据库 MySQL
database.propertise
数据库连接8一下
|
关系型数据库 数据库
ORA-01501: CREATE DATABASE failed
使用dbca建库时遇到ORA-01501: CREATE DATABASE failed这个错误,检查告警日志,发现有下面错误信息: SMON: enabling tx recovery Fri Apr 29 14:06:25 HKT 2016 replication_dependenc...
2029 0
|
SQL 数据库 索引
|
数据库 机器学习/深度学习 关系型数据库
|
关系型数据库 数据库管理 MySQL
|
关系型数据库 数据库 Oracle