Individual datafiles can be backed up as easily as we can back up a tablespace. You can back up one or more datafile with the BACKUP DATAFILE command. The database can be mounted or open. Datafile can be read/write or read-only.
You need to backup the datafile along with the control file because it contains the definition for the new datafile. RMAN automatically backs up the control file and the server parameter file (if the instance was started with a server parameter file) when datafile 1 is included in the backup.
If control file autobackup is enabled, then RMAN writes the current control file and server parameter file to a separate autobackup piece. Otherwise, RMAN includes these files in the backup set that contains datafile 1.
The following example back up the OE_TRANS_06.DBF datafile to disk:
#Connect to RMAN
#Connect RMAN to target database
CONNECT TARGET SYS/pass@TEST1;
#Connect RMAN to recovery catalog (optional)
CONNECT CATALOG rman/cat@devdb;
#Issue RMAN BACKUP DATAFILE command.
BACKUP AS BACKUPSET
The following example uses an SBT channel to back up datafiles 1 through 4 and a datafile copy stored at /tmp/system01.dbf to tape:
DEVICE TYPE sbt