Backing Up a Datafile

With datafiles, you can either back them up by number or by name. With Oracle9i, the syntax is straightforward. If you’re performing a disk-based backup and know the numbers of the datafiles that you want to back up, the command is:

RMAN> backup datafile 1,2;

For an Oracle8i disk-based backup, the syntax is:

RMAN> run {
2> allocate channel d1 type disk;
3> backup format
4> '/d99/rmanback/brdstn/rman_bckup_%d_%t_%U.bus' 
5> datafile 1, 2;
6> }

Alternatively, you can tell RMAN the name of a specific datafile that you want to back up:

RMAN> run {
2> allocate channel d1 type disk;
3> backup format
4> '/d99/rmanback/brdstn/rman_bckup_%d_%t_%U.bus'
5> '/d01/oradata/workprd/users_01.dbf';
6> }

To specify more than one datafile by name, list the names separated by commas.

Get Oracle RMAN Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.