Taking backups of particular tablespaces or datafiles using RMAN

«« Previous
Next »»

When database is running in ARCHIVELOG mode, you can also take Partial backups i.e. backup of particular tablespaces or datafiles using RMAN.

When taking manual backups using O/s commands we have to take tablespaces in the BACKUP mode to take ONLINE backups and then after backup is over we have to END the backup mode.

Whereas if you are taking backup using RMAN there is no need to take tablespaces in the BACKUP MODE you can simply take backup by just starting RMAN and typing the backup command.

To take online backup of particular tablespaces using RMAN do the following

Step 1

Start RMAN by typing the following command

$ export ORACLE_SID=test
$ rman target system/manager nocatalog

Then RMAN will get connected to the database and it will show the following messages

Taking backups of particular tablespaces or datafiles using RMAN

Step 2

For Example let's take backup of USERS tablespace

To take the backup of a particular tablespace we have to mentioned the tablespace name in the backup command.

rman> backup tablespace users tag 'usertsbak';

Taking backups of particular tablespaces or datafiles using RMAN

Similarly to take the backup of particular datafiles you can give the following command

rman> backup datafile 2,6 tag 'userdbfbak';

In the above command we are specifying the datafile id's instead of it's path and filename. You can see the file ID from V$DATAFILE view

In the above command 2 is the file ID of example01.dbf and 6 is the ID of users01.dbf

Once you type the above command you will get a output as shown below

Taking backups of particular tablespaces or datafiles using RMAN

«« Previous
Next »»

0 comments:

Post a Comment