$ rman target /
- CONFIGURE BACKUP OPTIMIZATION ON;
Configuring a Retention Policy: Example
This example configures a retention policy with a recovery window of 2 weeks, and then resets the retention policy to its default value of REDUNDANCY = 1:
- CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;
- CONFIGURE RETENTION POLICY CLEAR;
Configuring Automatic Disk and Tape Channels: Example
This example configures generic DISK and sbt channels, sets the default device type to sbt, and sets PARALLELISM to 3:
- CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/?/%U';
- CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(NSR_SERVER=bksrv1)';
- CONFIGURE DEFAULT DEVICE TYPE TO sbt;
- CONFIGURE DEVICE TYPE sbt PARALLELISM 3;
Overriding the Default Device Type: Example
This example configures the default device type to sbt, backs up the archived logs on the default sbt channel, and then backs up the database to disk on the default disk channel:
- CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(NSR_SERVER=bksrv1)';
- CONFIGURE DEFAULT DEVICE TYPE TO sbt;
- BACKUP ARCHIVELOG ALL;
- BACKUP DEVICE TYPE DISK DATABASE;
Configuring Automatic Channels Across File Systems: Example
This example configures automatic disk channels across three file systems:
- CONFIGURE DEVICE TYPE DISK PARALLELISM 3;
- CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/disk1/backup/%U';
- CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/disk2/backup/%U';
- CONFIGURE CHANNEL 3 DEVICE TYPE DISK FORMAT '/disk3/backup/%U';
- BACKUP DEVICE TYPE DISK DATABASE PLUS ARCHIVELOG;
Configuring Automatic Channels in an Oracle Real Application Clusters Configuration: Example
This example allocates automatic sbt channels for two nodes of an Oracle Real Application Clusters database:
- CONFIGURE DEVICE TYPE sbt PARALLELISM 2;
- CONFIGURE DEFAULT DEVICE TYPE TO sbt;
- CONFIGURE CHANNEL 1 DEVICE TYPE sbt CONNECT 'SYS/change_on_install@node1'
PARMS 'ENV=(NSR_SERVER=bkserv1)';
- CONFIGURE CHANNEL 2 DEVICE TYPE sbt CONNECT 'SYS/change_on_install@node2'
PARMS ENV=(NSR_SERVER=bkserv2)';
Clearing Automatic Channels: Example
This example clears manually numbered DISK channels 2 and 3 and the generic sbt channel:
- CONFIGURE CHANNEL 2 DEVICE TYPE DISK CLEAR;
- CONFIGURE CHANNEL 3 DEVICE TYPE DISK CLEAR;
- CONFIGURE CHANNEL DEVICE TYPE sbt CLEAR;
Configuring and Clearing Parallelism: Example
This example sets DISK parallelism to 2, then changes it to 3, then returns it to the default parallelism of 1:
- CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
- CONFIGURE DEVICE TYPE DISK PARALLELISM 3;
- CONFIGURE DEVICE TYPE DISK CLEAR;
Configuring Backup Copies: Example
This example configures duplexing to 3 for DISK backups of datafiles and control files (control file autobackups on disk are a special case and are never duplexed) and then runs a database backup, specifying three different file systems for the copies:
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 3;
- BACKUP DEVICE TYPE DISK DATABASE
FORMAT '/disk1/backup/%U', '/disk2/backup/%U', '/disk3/backup/%U';
Configuring the Snapshot Control File Location: Example
This example configures a new location for the snapshot control file and then resynchronizes the recovery catalog.
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '?/oradata/snap.cf';
Excluding a Tablespace from a Whole Database Backup: Example
This example excludes the example tablespace from whole database backups, then returns the tablespace to its default value of "not excluded":
- CONFIGURE EXCLUDE FOR TABLESPACE example;
- CONFIGURE EXCLUDE CLEAR;
Specifying Auxiliary Filenames: Example
This example duplicates a database to a remote host with a different directory structure, by using CONFIGURE AUXNAME to specify new filenames for the datafiles:
# set auxiliary names for the datafiles
CONFIGURE AUXNAME FOR DATAFILE 1 TO '/oracle/auxfiles/aux_1.f';
CONFIGURE AUXNAME FOR DATAFILE 2 TO '/oracle/auxfiles/aux_2.f';
CONFIGURE AUXNAME FOR DATAFILE 3 TO '/oracle/auxfiles/aux_3.f';
CONFIGURE AUXNAME FOR DATAFILE 4 TO '/oracle/auxfiles/aux_4.f';
RUN
{
ALLOCATE AUXILIARY CHANNEL dupdb1 TYPE DISK;
DUPLICATE TARGET DATABASE TO dupdb
LOGFILE
GROUP 1 ('?/dbs/dupdb_log_1_1.f',
'?/dbs/dupdb_log_1_2.f') SIZE 200K,
GROUP 2 ('?/dbs/dupdb_log_2_1.f',
'?/dbs/dupdb_log_2_2.f') SIZE 200K REUSE;
}
# Un-specify the auxiliary names for the datafiles so that they are not overwritten
# by mistake:
CONFIGURE AUXNAME FOR DATAFILE 1 CLEAR;
CONFIGURE AUXNAME FOR DATAFILE 2 CLEAR;
CONFIGURE AUXNAME FOR DATAFILE 3 CLEAR;
CONFIGURE AUXNAME FOR DATAFILE 4 CLEAR;
Specifying the Default Format for the Control File Autobackup: Example
This example turns on the autobackup feature, then changes the default format for the DISK and sbt devices, then clears the autobackup setting:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '?/oradata/%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE sbt TO 'cf_auto_%F';
CONFIGURE CONTROLFILE AUTOBACKUP CLEAR; # returns to default setting of OFF