Creating Backup Sets   «Prev  Next»

Lesson 3Backup set syntax
ObjectiveIdentify the syntax of the backup command.

Oracle Backup set syntax

Backup sets are created with the backup command in Recovery Manager. Though you were briefly introduced to this command in the previous module, there are many syntax options for this powerful command.

The backup command

Earlier in this course, you were introduced to the basics of the backup command-the backup type, tag, and backup_spec portions of the command. Additional options can be used with the command, two of which are explained below.

formatspec

The formatspec tag can be used as part of the backup command, which means it will apply to all backup specs in the command or to an individual backup_spec. The tag can also be used in the allocate command to apply to all files that will use that channel.
The formatspec tag consists of the keyword format, followed by a format spec in single quotes. The format spec includes literal characters and specific substitution variables that are automatically replaced by RMAN. For instance, the %d substitution variable is automatically replaced with the name of the database, the %t substitution variable is automatically replaced with the timestamp, and so on.

SKIP

The SKIP keyword can be used for the entire backup or for a specific backup set. The SKIP keyword is followed by one of three choices:
  1. OFFLINE, which will skip any offline data files
  2. READONLY, which will skip any data files that are read-only
  3. INACCESSIBLE, which will skip any data files or archived redo logs that cannot read due to I/O errors.
The following Simulation walks you through a backup process:

rman backup 1
1) rman backup 1

rman backup 2
2) rman backup 2

rman backup 3
3) rman backup 3

rman backup 4
4) rman backup 4

rman backup 5
5) rman backup 5

rman backup 6
6) rman backup 6

  1. Begin the backup process with the run command and press Enter.
  2. Prompt
  3. run
  4. Type run and press enter.
  1. Allocate a disk channel called ch1 and press Enter.
  2. Prompt
  3. allocate channel c1 type disk
  4. Type allocate channel c1 type disk; and press enter.

In the next lesson, you will learn how RMAN combines blocks from different files in a single backup piece, and about another important option for the backup command.