This page describes how to restore an Autonomous Database from a backup.
You can restore an Autonomous Database from a backup or to a point in time. When you restore a database, it retains the schema and all of the data up to the time of the backup, as well as the database options. To view available backups of an Autonomous Database, see View backups for an Autonomous Database.
To learn more about how backup and recovery works on an Autonomous Database, see About Backup and Recovery on Autonomous Database.
Restore an Autonomous Database
You can only restore an Autonomous Database whose status is "Available".
To restore your Autonomous Database from a backup, follow these steps:
Console
Go to the Autonomous Database page.
Click the name of the Autonomous Database that you want to restore.
On the Autonomous Database details page, select the Backups tab.
To restore from a backup, do the following:
In the Backups section, for your chosen Backup timestamp, click View actions, and then click Restore.
To confirm the restore operation, type the Autonomous Database ID.
Click Restore.
To restore to a point in time, do the following:
In the Backups section, click Restore to timestamp.
Within the retention window, specify a timestamp.
To confirm the restore operation, enter the Autonomous Database ID.
Click Restore.
On the Backups tab, the Status field displays the progress of the restore operation.
gcloud
Run the gcloud oracle-database autonomous-database restore command:
gcloud oracle-database autonomous-database restore DATABASE_NAME
--location=REGION_ID
--project=PROJECT_NAME
--restore-time=RESTORE_TIME
Replace the following:
- DATABASE_NAME: name of the database you want to restore.
- REGION_ID: the region of your database.
- PROJECT_NAME: the name of your Google Cloud project.
- RESTORE_TIME: the backup time you want to restore your
database to. You must use the
endTimeof the backup as the restore time.
To see a list of available backups for your database, see View backups for an Autonomous Database.
API
To restore an Autonomous Database, run the following curl command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/autonomousDatabases/DATABASE_ID:restore" \
-d \
'{
"restoreTime": "TIMESTAMP"
}'
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project. If you're using a Shared VPC, then this project ID is the ID of your host project.
- REGION: the region of your database.
- DATABASE_ID: the ID of your database.
- TIMESTAMP: the date and time to which you want to restore the database. Specify
the timestamp in RFC 3339 format. For example, "
2014-10-02T15:01:23Z".