This topic describes how to restore a full backup of a PolarDB for MySQL cluster to a new cluster by using different methods.
Restoration methods
You can use the following methods to restore data in a PolarDB for MySQL cluster to a new cluster or the original cluster based on your business requirements.
- Method 1: Restore a full backup to a new cluster.
Restore all data of the original cluster to a new cluster. After you verify the restored data on the new cluster, migrate the data from the new cluster back to the original cluster. This topic describes how to restore data by using this method.
Note Only the data and account information of the original cluster are restored to the new cluster. The parameters of the original cluster are not restored to the new cluster. - Method 2: Restore data of specified databases or tables to the original cluster.
For example, in gaming business, you need to restore the data of only one or more players. For more information, see Restore data of specific databases and tables.
Note This method is supported by only clusters of PolarDB for MySQL 5.6.
Restore data to a specified point in time
Restore data from a backup set (snapshot)
Log on to the new cluster and verify the data
For more information about how to log on to a cluster, see Connect to a PolarDB for MySQL cluster.
Migrate data to the original cluster
After you verify the data on the new cluster, you can migrate the data from the new cluster back to the original cluster. For more information, see Migrate data between Apsara PolarDB for MySQL clusters.
FAQ
- How do I restore a database that I accidentally deleted?
PolarDB for MySQL allows you to restore the database that you accidentally deleted. For more information, see Restore data of specific databases and tables. If your cluster does not support the restoration of individual databases and tables, you can restore the full data to a new cluster. After you verify the data on the new cluster, migrate the restored data from the new cluster back to the original cluster.
- If a data backup of my cluster does not exist, can I restore the data to a point in
time?
No, you cannot restore the data of your cluster to a point in time if a data backup of your cluster does not exist. To restore data to a specific point in time, you must first restore the data of a full backup that was generated before the specified point in time. Then, you must restore the incremental data to the specific point in time based on the binary logs.
References
Related API operations
API | Description |
---|---|
CreateDBCluster | Restores the data of a PolarDB cluster.
Note You must set CreationOption to CloneFromPolarDB.
|