Restore a database
Data Management Service (DMS) lets you restore a database to recover from accidental deletion, data corruption, or a failed change operation.
Restore a database(English).mp4
When to restore a database
Restore a database when you need to:
-
Recover data after an accidental
DROP TABLEorDELETEoperation -
Roll back to a known-good state before a failed schema migration
-
Retrieve historical data from a specific point in time
-
Recover a database instance that was deleted
Restore options
DMS supports the following restore approaches. Choose based on how far back you need to go and whether you want to restore to the original instance or a new one.
| Restore type | Description | Use when |
|---|---|---|
| Point-in-time restore | Restores the database to a specific timestamp within the backup retention window | You know when the data loss occurred |
| Snapshot restore | Restores from a full backup snapshot | You want a clean restore from a complete backup |
| Deleted instance restore | Recovers a database instance that has been deleted | The instance was accidentally deleted |
Restoring does not overwrite your existing database. The restored data is created as a new instance or written to a separate target. Back up any changes made after your target restore point before proceeding.
Prerequisites
Before you begin, ensure that you have:
-
A DMS account with database restore permissions
-
An existing backup for the database you want to restore
-
The target restore time or snapshot ID (for point-in-time or snapshot restore)
Restore a database
-
Log in to the DMS console.
-
In the left navigation pane, find the database instance you want to restore.
-
Right-click the instance and select Restore.
-
On the Restore Database page, select the restore type:
-
Point-in-time restore: Enter the target date and time.
-
Snapshot restore: Select a snapshot from the list.
NoteTimes are displayed in your local time zone. Verify the UTC offset when selecting a restore point to avoid restoring to the wrong time.
-
-
Configure the restore target:
-
Select whether to restore to the original instance or a new instance.
-
If restoring to a new instance, specify the instance name and configuration.
-
-
Click OK to start the restore job.
Verify the restore
After the restore job completes:
-
In the DMS console, navigate to the restored database.
-
Run a query to confirm the data matches your expected state.
-
Check the restore job status — a Successful status confirms the operation completed without errors.
What's next
-
Back up a database — set up regular backups to reduce recovery time in future incidents
-
Manage database instances — learn how to monitor and manage your database instances in DMS