Databases Reference
In-Depth Information
Instead of specifying a data file number, you can specify the names of the data files you want to back up. In
the following example, the first command configures a channel with a specific file name format, and the second
command backs up two data files:
RMAN> configure channel device type disk format '/oraback/prod1/%d_%U.bus';
RMAN> backup datafile '/u01/app/oracle/oradata/system01.dbf',
'/u01/app/oracle/oradata/users01.dbf';
Once you configure a channel, there is no need to specify it in other backup commands unless you need to
change it. these configuration settings are persistent.
Note
You can also take incremental backups of data files. The following example takes an incremental level 1 backup
of data file 5:
RMAN> backup incremental level 1 datafile 5;
As you'll learn later in this topic, you must already have made a level 0 incremental backup of the database
(with the command backup incremental level 0 datafile 5 ) before you can take an incremental level 1 backup.
You can use RMAN to make a physical copy, also called an image copy , of a data file. The next example makes an
image copy of the data file users01.dbf and uses the format parameter to specify the backup file name. The actual file
users01.dbf is located in the directory /u01/app/oracle/oradata/orcl, and its image backup, also named users01.dbf,
is stored in the directory /u01/app/oracle/backup.
RMAN> backup as copy datafile '/u01/app/oracle/oradata/orcl/users01.dbf'
2> format '/u01/app/oracle/backup/users01.dbf';
Starting backup at 11-SEP-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=/u01/app/oracle/oradata/orcl/users01.dbf
output file name=/u01/app/oracle/backup/users01.dbf tag=TAG20120911T111006 RECID=6 STAMP=793710608
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 11-SEP-12
Starting Control File Autobackup at 11-SEP-12
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2012_09_11/o1_mf_n_793710610_
84yrm3wj_.bkp comment=NONE
Finished Control File Autobackup at 11-SEP-12
RMAN>
The as copy clause directs RMAN to make an image copy instead of the default backup sets.
How It Works
The backup datafile command is fairly straightforward. RMAN will back up the specified data files and put them
into backup pieces. If auto backup of the control file is disabled and data file 1 (SYSTEM) is backed up, RMAN will
include a backup of the current control file. If the auto backup of the control file is disabled and the system tablespace
isn't included in the tablespace list, then no backup of the control file is created.
 
 
Search WWH ::




Custom Search