

# Oracle database restore

You restore an Oracle database with AWS Backup as a new database, either on the original server or on an alternate server. Restores are non-destructive; AWS Backup does not overwrite an existing database. You can restore from a snapshot recovery point, or restore to a point in time from the local vault.

## How restore works
<a name="restore-onprem-oracle-how"></a>

Every restore starts from a snapshot recovery point. Archive log recovery points are never selectable as a restore entry point. You choose a snapshot recovery point, provide the target location and restore parameters, and AWS Backup recovers the database as a new database.

For a point-in-time restore, AWS Backup starts from the snapshot base you select and automatically applies the required archive logs to reach your target time.

## Point-in-time recovery from a local vault
<a name="restore-onprem-oracle-pitr"></a>

To restore to a point in time, you explicitly select a **base snapshot recovery point** and specify a **target timestamp**. AWS Backup replays the archive logs from that base to reach your target time.

You select the base snapshot yourself; AWS Backup does not choose it for you. Explicit selection lets you choose an older, known-clean base when you recover from corruption, and it lets AWS Backup authorize the restore against the specific recovery point you chose.

Point-in-time recovery is available from the local vault only. To restore to a point in time from a snapshot in a cloud vault, first copy that snapshot back to a local vault.

AWS Backup shows the restorable time range for the selected base. A small gap can appear between the snapshot time and the start of the restorable log range, because the archive logs bundled inside the first full backup of a chain cannot be used as individual point-in-time targets. Point-in-time recovery works within the log windows after that first backup.

## Restoring a RAC database
<a name="restore-onprem-oracle-rac"></a>

When you restore a RAC database, AWS Backup restores it as a standalone, single-instance database. The RAC cluster topology is not backed up. After the restore, re-add the database to Oracle Grid Infrastructure manually.

## Restore parameters
<a name="restore-onprem-oracle-parameters"></a>

When you restore an Oracle database, you provide the following parameters. AWS Backup pre-populates many of them from the recovery point metadata.


| Parameter | Description | 
| --- | --- | 
| Recovery point | The snapshot recovery point to restore from. | 
| Restore type | Full database, or point-in-time recovery. | 
| Target timestamp | For point-in-time recovery, the time to restore to. | 
| Recover to original or new location | Where to restore the database. | 
| Target Oracle server | The ARN of the server to restore to. | 
| Target database name | The name for the restored database, up to 8 characters. | 
| Base Directory | The Oracle base directory on the target. | 
| Oracle Home | Pre-populated from the recovery point; must match the source version. | 
| Data files destination | An Oracle ASM disk group (for example, \+DATA1) or an empty filesystem directory. | 
| Enable archive log mode | On by default. | 
| Restore Channels | The number of RMAN restore channels, from 1 to 255. If you leave it empty, the appliance calculates the count from the number of appliance nodes and the server's CPUs, up to 8. | 
| Shell Environment | Environment variables for the restore, including TDE wallet variables. | 
| Leave database in recovery mode | Leaves the database in MOUNT state. | 
| Pfile Parameters | Target-aware initialization parameter defaults. You can specify up to 10 parameters. | 
| IAM Role | The role AWS Backup uses to perform the restore. | 

The TDE status is shown as read-only. For a TDE database, make sure a copy of the source database's keystore is configured on the target as a software keystore in auto-login mode before you restore, and set the wallet variables through the Shell Environment parameter.

## Restoring to Amazon EC2
<a name="restore-onprem-oracle-ec2"></a>

You can restore an Oracle database to Amazon EC2. Install the backup agent on the Amazon EC2 instance, use a cloud backup appliance, and copy the cloud recovery point to a local vault, then restore from the local vault.