RMAN: Displaying current backup progress

To check the progress of your current RMAN backup use this script:

#This is my favorite script

select recid
 , output_device_type
 , dbsize_mbytes
 , input_bytes/1024/1024 input_mbytes
 , output_bytes/1024/1024 output_mbytes
 , (output_bytes/input_bytes*100) compression
 , (mbytes_processed/dbsize_mbytes*100) complete
 , to_char(start_time + (sysdate-start_time)/(mbytes_processed/dbsize_mbytes),'DD-MON-YYYY HH24:MI:SS') est_complete
 from v$rman_status rs
 , (select sum(bytes)/1024/1024 dbsize_mbytes from v$datafile) 
 where status='RUNNING'
 and output_device_type is not null

HOW TO CATALOG TAPE BACKUP PIECES

You can catalog TAPE backup piece only using automatic channel:

RMAN> configure channel device type 'SBT_TAPE' parms <mml parameters>

Example:

configure channel device type 'SBT_TAPE' parms='ENV=(NB_ORA_CLIENT=ClientHostName,NB_ORA_SERV=backupServerHostName)';
RMAN> catalog device type 'SBT_TAPE' backuppiece 'arch_dEYC_ub4qtfud9_s20836_p1_t903346601';

How to catalog backup located on TAPE in RMAN?

If you are using Symantec Netbackup as a backup server, the following command will be useful for you:

1. To list available files located on tape taken by some client, run the following:

# /usr/openv/netbackup/bin/bplist -C r2n1 -t 4 -l -R /

where,

-C     client name
-t     is a policy type , where 4 means Oracle
-l     shows more details info
-R    recursively
/     root directory

–output

-rw-rw---- oracle oinstall 18939648K Aug 11 04:48 /al_dMEDIA_s3941_p1_t791009326_T20120811

2.  In my case this backuppiece is taken by r2n1 client and now I am cataloging it on orcl client. That’s why I need to pass additional parameters to channel. If these clients are the same , parameters are not necessary. (If you have some problem, like orcl can’t see r2n1’s backups see my post about alternate client)

RMAN> CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(NB_ORA_CLIENT=r2n1,NB_ORA_SERV=JUS-BACKUP01)';

RMAN> catalog device type 'SBT_TAPE' backuppiece 'al_dMEDIA_s3941_p1_t791009326_T20120811';

3. If you want to clear your configuration do the following,or skip this step.

CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' CLEAR;

That’s all, good luck!