Databases Reference
In-Depth Information
Backup Sets vs. Image Copies
The default backup mode of RMAN instructs it to back up only blocks that have been used in a data file; these are
known as backup sets. RMAN can also make byte-for-byte copies of the data files; these are known as image copies.
Creating a backup set is the default type of backup that RMAN creates. The next command creates a backup set
backup of the database:
RMAN> backup database;
If you prefer, you can explicitly place the AS BACKUPSET command when creating backups:
RMAN> backup as backupset database;
You can instruct RMAN to create image copies by using the AS COPY command. This command creates image
copies of every data file in the database:
RMAN> backup as copy database;
Because image copies are identical copies of the data files, they can be directly accessed by the DBA with OS
commands. For example, say you had a media failure, and you didn't want to use RMAN to restore an image copy.
You could use an OS command to copy the image copy of a data file to a location where it could be used by the
database. In contrast, a backup set consists of binary files that only the RMAN utility can write to or read from.
I prefer to use backup sets when working with RMAN. The backup sets tend to be smaller than the data files and
can have true binary compression applied to them. Also, I don't find it inconvenient to use RMAN as the mechanism
for creating backup files that only RMAN can restore. Using RMAN with backup sets is efficient and very reliable.
Backing Up Tablespaces
RMAN has the ability to back up at the database level (as shown in the prior section), the tablespace level, or, even
more granularly, at the data file level. When you back up a tablespace, RMAN backs up any data files associated with
the tablespaces(s) that you specify. For instance, the following command will back up all the data files associated with
the SYSTEM and SYSAUX tablespaces:
RMAN> backup tablespace system, sysaux;
One scenario in which I back up at the tablespace level is if I've recently created a new tablespace and want to
take a backup of just the data files associated with the newly added tablespace. Note that when B&R issues, it's often
more efficient to work with one tablespace (because it's generally much faster to back up one tablespace than the
entire database).
Backing Up Data Files
You may occasionally need to back up individual data files. For example, when troubleshooting issues with backups,
it's often helpful to attempt to successfully backup one data file. You can specify data files by file name or by file
number, as follows:
RMAN> backup datafile '/u01/dbfile/o12c/system01.dbf';
In this example, file numbers are specified:
RMAN> backup datafile 1,4;
 
Search WWH ::




Custom Search