1. View Current RMAN Configuration

Before we take the backup, we have to configure certain RMAN parameters. For example, how long you want to reatain the RMAN backup, etc.

To connect to RMAN:

cmd: rman target /

To view current RMAN configurations, execute “show all”.

It will  displays various RMAN parameters and their current values.

cmd: RMAN> SHOW ALL;

2. Change Few RMAN Configuration Parameters

Location:where we want to save the RMAN backup.

cmd:RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT ‘/backup/rman/full_%u_%s_%p’;

Retention Period: It automatically deletes all the old backups that are older than the retention period.

cmd:RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

To check the changes are reflected or not

cmd:RMAN> SHOW ALL;

Clear a Parameter:If you want to clear a parameter and set its value to default, use CLEAR at the end of the configuration. So, the retention policy is set to 1 day

cmd:RMAN> CONFIGURE RETENTION POLICY CLEAR;

3. Backup Oracle Database:

Create a directory

cmd: mkdir -p /backup/rman

To take a full backup of the database without the archive logs

cmd:RMAN> BACKUP AS BACKUPSET DATABASE

Take backup of only one tablespace:

cmd:RMAN> BACKUP AS BACKUPSET TABLESPACE PRD01;

See RMAN backup files:

cmd:$ ls -l /backup/rman