Backing Up Your Data - Oracle Database on AWS

Backing Up Your Data

After you deploy Oracle Database on AWS, you'll want to perform and schedule your database backups. The following sections describe some of the backup options available to you. If you have a production database, we recommend that you set up a backup strategy and implement it as quickly as possible.

Oracle Secure Backup

If you chose to install the Oracle Secure Backup Cloud Module, the Quick Start performs an initial, complete backup of your database to the S3 bucket you specified in the Quick Start parameters.

Amazon S3 is the perfect place to save your backups, because it is durable, highly available, and cost-effective, and it has a high throughput to your instances.

After deploying the Quick Start, access your machine and view the Amazon S3 log to see the RMAN backup:

You can use the /tmp/rmanbackup.cmd script to perform new backups or to schedule backup tasks and customize the settings for your needs.

rman cmdfile=/tmp/rmanbackup.cmd log=/tmp/rmanbackup.log

You can also schedule your backups by using Crontab or another scheduling tool.

Backups to Disk and Amazon S3

You can perform backups to disk, create and attach a new Amazon EBS volume, create a new file system for local backup, and then copy the backup files by using the AWS CLI cp or sync command.

To use cp for individual files:

aws s3 cp /localfilesystem/backuppiece.bkp s3://YOURBUCKET/KEY/DB/

To use cp for a folder:

aws s3 cp /localfilesystem/backupfolder/ s3://YOURBUCKET/KEY/BACKUP/ --recursive

For more information about creating new EBS volumes and file systems, see the AWS documentation.

AMIs and Snapshots

You can use the AWS CLI to generate an Amazon Machine Image (AMI) based on the image of your running instance, and to take snapshots of EBS volumes.


We recommend that you shut down your database instances before creating an AMI or taking EBS snapshots.

After you create an AMI, you can launch it as a new instance. AWS will assign it a new private IP address, unless you specify your own IP address. If you move your instance to another VPC or another AWS Region, AWS might change its IP address. If so, follow these steps to change the IP address after launching the instance:

  1. Edit the following files to reflect the correct IP and host names:

    /u01/app/oracle/product/ /u01/app/oracle/product/ /etc/hosts
  2. Run the following command to update the installation:

    sudo su – cd /u01/app/oracle/product/ perl -deconfig -force cd /u01/app/oracle/product/ ./ cd /u01/app/oracle/product/ ./srvctl add asm ./srvctl add listener ./srvctl start asm
  3. As an Oracle user with ASM environment variables loaded, connect to asmcmd and mount the DATA and RECO disk groups.

    $. oraenv +ASM asmcmd mount data mount reco