Restoring a DB Instance from Backups
Scenarios
You can use an automated or manual backup to restore data to the point in time when the backup was created. The restoration is at the instance level.
A full backup will be downloaded from OBS for restoration. The time required depends on the amount of data to be restored.
Prerequisites
There is an automated or manual backup available for the DB instance. If you want to restore a deleted DB instance, you need to ensure that there is a manual backup because automated backups are deleted along with the DB instance.
Precautions
- Data can be restored to a new, the original, or an existing DB instance.
- Keep your account balance above zero so that backups can be restored to a new DB instance. You will be billed for the new DB instance.
- Data on the original DB instance will be overwritten and the original DB instance will be unavailable during the restoration.
- Restoring to an existing DB instance will overwrite data and reset the root password. The existing DB instance is unavailable during the restoration. DB instances will not be displayed unless they have the same DB engine type, version, and table name case sensitivity as the original DB instance.
- If the original password of the existing DB instance cannot be used to connect to the database after the restoration, you can reset the password.
- Once encrypted backup is enabled for your DB instance, data cannot be restored to an existing DB instance, even if encrypted backup is disabled later.
- Ensure that the storage space of the selected DB instance is at least that of the original DB instance. Otherwise, data will not be restored.
Procedure
- Log in to the management console.
- Click in the upper left corner and select a region and project.
- Click in the upper left corner of the page and choose Databases > GaussDB(for MySQL).
- On the Backups page, locate the backup to be restored and click Restore in the Operation column.
- Select where you want to restore the backup to:
- Restoring the backup to a new DB instance
- Set Restoration Method to Create New Instance and click OK.
Figure 1 Restoring to a new DB instance
- On the displayed page, set required parameters and click Next.
- The region, DB engine, and DB engine version are the same as those of the original DB instance and cannot be changed.
- The default database port is 3306.
- Other settings are the same as those of the original DB instance by default but can be modified. For details, see Buying a DB Instance.
- Set Restoration Method to Create New Instance and click OK.
- Restoring the backup to the original DB instance
- Set Restoration Method to Restore to Original, select the confirmation check box, and click Next.
Figure 2 Restoring to the original DB instance
- Confirm the task details and click OK.
Data on the original DB instance will be overwritten and the original DB instance will be unavailable during the restoration.
- Set Restoration Method to Restore to Original, select the confirmation check box, and click Next.
- Restoring the backup to an existing DB instance
- Set Restoration Method to Restore to Existing, select the confirmation check box, and click Next.
Figure 3 Restoring to an existing DB instance
- Confirm the task details and click OK.
- Restoring to an existing DB instance will overwrite data and reset the root password. The existing DB instance is unavailable during the restoration. DB instances will not be displayed unless they have the same DB engine type, version, and table name case sensitivity as the original DB instance.
- If the original password of the existing DB instance cannot be used to connect to the database after the restoration, you can reset the password.
- Set Restoration Method to Restore to Existing, select the confirmation check box, and click Next.
- Restoring the backup to a new DB instance
- View the restoration results.
- Restoring the backup to a new DB instance
A new DB instance is created, where data is restored based on the point in time when the backup was created. When the instance status changes from Creating to Available, the restoration is complete.
The new DB instance is independent from the original one. If you want to offload read pressure from the primary node, create one or more read replicas for the new DB instance.
After the restoration, a full backup will be automatically triggered.
- Restoring the backup to the original DB instance
On the Instances page, when the instance status changes from Restoring to Available, the restoration is complete.
After the restoration, a full backup will be automatically triggered.
- Restoring the backup to an existing DB instance
On the Instances page, when the instance status changes from Restoring to Available, the restoration is complete. If the existing DB instance contains read replicas, the read replica status is the same as the existing DB instance status.
After the restoration, a full backup will be automatically triggered.
- Restoring the backup to a new DB instance
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot