cancel
Showing results for 
Search instead for 
Did you mean: 

Netbackup Rman Database restores

Toddman214
Level 6

Windows 2008r2 master and media servers

Netbackup 7.5.0.4

 

Hello,

 

We've run into an emergency restore issue with older Oracle database data backed up using Rman. A Netbackup policy exists, and is simply set up with an open schedule to let the DBA's send the Rman job through to the needed tape library at whatever time they need. The issue is that I've recalled the tapes and loaded them, but the DBA's are seeing that the Rman catalog has no record of the media ID, so they cannot find it to start any restore processes. But, I can see the media ID's in the Netbackup catalog. They may have purged the Rman catalog or something...not sure. Anyway, I believe that it is expected that netbackup cannot view these files in the BAR GUI, as it could for file shares, server backups, etc.

 

When I run a tape report for 'images on tape', it does show me the client server name that backed up the data, policy names, file sizes, etc.

When I run a tape report for 'tape contents', it does show me the Backup ID, expiration data, creation data, etc.

 

What they are ultimately needing is to be able to view the actual Oracle database files written to the tape. Is Netbackup truly only a middle-man or a tool Rman uses when sending its data to the tape drives (as I've read and been told), or is Netbackup capable of viewing these files via some command or something, using the Netbackup backup ID to translate?

 

Thank you.

 

Todd

2 ACCEPTED SOLUTIONS

Accepted Solutions

sri_vani
Level 6
Partner

To view the backedup files frm NBU....u can try below command:

<install files/.....netbackup/bin

bpflist  -C <clientname> -t 4 -S <masterservername> -s mm/dd/yyyy hh:mm:ss -e mm/dd/yyyy hh:mm:ss -l -b -R /

(I have nt tried till now for oracle...I tried for windows/ndmp and it worked)

Please try and lemme know..

 

View solution in original post

Yasuhisa_Ishika
Level 6
Partner Accredited Certified
  1. Check backup piece handle by bplist
    root# bplist -t 4 -l -s <start_time> -e <end_time> -R /
     
  2.  Restore SPFILE
    dba$ rman target / nocatalog
    RMAN> SET DBID=<DBID>
    RMAN> STARTUP FORCE NOMOUNT
    RMAN> RUN {
    2> ALLOCATE CHANNEL t1 TYPE sbt_tape;
    3> RESTORE SPFILE FROM '<handle_of_backup_piece_that_contains_SPFILE_backup>';
    4> RELEASE CHANNEL t1;
    5> }
    RMAN> STARTUP FORCE

    SPFILE backup may be included in last piece of DB file backup by default.
    IN last step, you may see an error related to control file, but it is expected. Ignore it.
     
  3. Restore control file
    RMAN> RUN {
    2> ALLOCATE CHANNEL t1 TYPE sbt_tape;
    3> RESTORE CONTROL FILE FROM '<handle_of_controlfile_backup>';
    4> RELEASE CHANNEL t1;
    5> }
    RMAN> ALTER DATABASE MOUNT;
     
  4. Restore and recover DB
    RMAN> RUN {
    2> ALLOCATE CHANNEL t1 TYPE sbt_tape;
    3> RESTORE DATABASE;
    4> RECOVER DATABASE;
    5> RELEASE CHANNEL t1;
    6> }
    RMAN> ALTER DATABASE OPEN RESETLOGS;

    You may see an error related to archive logs, but it is expeced. Ignore it, or ask your Oracle DBA. Once controlfile is restored, DBA can check RMAN recovery catalog and they may determine sufficient option to RESTORE and RECOVER command from catalog information.
     

View solution in original post

10 REPLIES 10

sri_vani
Level 6
Partner

To view the backedup files frm NBU....u can try below command:

<install files/.....netbackup/bin

bpflist  -C <clientname> -t 4 -S <masterservername> -s mm/dd/yyyy hh:mm:ss -e mm/dd/yyyy hh:mm:ss -l -b -R /

(I have nt tried till now for oracle...I tried for windows/ndmp and it worked)

Please try and lemme know..

 

Will_Restore
Level 6

bplist -C ...

  instead of

bpflist -C ...

 

 

Yasuhisa_Ishika
Level 6
Partner Accredited Certified

Actual file names on Oracle DB host is not paased while backup so NetBackup can not provide such information. Only backup handles are passed from Oracle. To get file name, RMAN catalong on Oracle is needed, and it is Oracle's matter.

By default, RMAN catalog is included in control file backup so it may be possible to recovery DB by two or three steps. I have done such operation several times in test environment, and also wrote the procudure in some threads here.

Yasuhisa_Ishika
Level 6
Partner Accredited Certified
  1. Check backup piece handle by bplist
    root# bplist -t 4 -l -s <start_time> -e <end_time> -R /
     
  2.  Restore SPFILE
    dba$ rman target / nocatalog
    RMAN> SET DBID=<DBID>
    RMAN> STARTUP FORCE NOMOUNT
    RMAN> RUN {
    2> ALLOCATE CHANNEL t1 TYPE sbt_tape;
    3> RESTORE SPFILE FROM '<handle_of_backup_piece_that_contains_SPFILE_backup>';
    4> RELEASE CHANNEL t1;
    5> }
    RMAN> STARTUP FORCE

    SPFILE backup may be included in last piece of DB file backup by default.
    IN last step, you may see an error related to control file, but it is expected. Ignore it.
     
  3. Restore control file
    RMAN> RUN {
    2> ALLOCATE CHANNEL t1 TYPE sbt_tape;
    3> RESTORE CONTROL FILE FROM '<handle_of_controlfile_backup>';
    4> RELEASE CHANNEL t1;
    5> }
    RMAN> ALTER DATABASE MOUNT;
     
  4. Restore and recover DB
    RMAN> RUN {
    2> ALLOCATE CHANNEL t1 TYPE sbt_tape;
    3> RESTORE DATABASE;
    4> RECOVER DATABASE;
    5> RELEASE CHANNEL t1;
    6> }
    RMAN> ALTER DATABASE OPEN RESETLOGS;

    You may see an error related to archive logs, but it is expeced. Ignore it, or ask your Oracle DBA. Once controlfile is restored, DBA can check RMAN recovery catalog and they may determine sufficient option to RESTORE and RECOVER command from catalog information.
     

Toddman214
Level 6

Thank you Sri Vani. That allowed me to view a list of oracle database files and even the control files. But, is it actually pulling that data from the tape itself, or just from the Netbackup catalog?

 

Thank you, as well, Yasuhisa. Ive given the commands to our oracle DBA. My question is then, if only backup handles are passed to Netbackup from Rman, where is the pblist command pulling that list of Oracle database files and control files from?

Yasuhisa_Ishika
Level 6
Partner Accredited Certified

bplist pulls data from NetBackup catalog. Have you get actual files like *.dbf from bplist. As far as I know, "bplist -t 4" shows only backup piece handle at least in stream-based backup. I have no experience with proxy copy, so i have no idea if bplist shows actual file name or backup piece handle in proxy copy.

Toddman214
Level 6

Hello Yasuhisa, When I run the command, it pulls a list of files that look like these below. These look like the same kinds of files I see in the job details while an Rman job is writing through Netbackup.

-rw-rw---- oracle dba 66322432 Mar 27 2013 c-1791285659-20130327-02:\

-rw-rw---- oracle dba 66322432 Mar 27 2013 Wed_ohlprod2_CF_OHLPROD2_bk_u83o5iekq_s152835_p1_t811154074:\

-rw-rw---- oracle dba 5579776K Mar 27 2013 Wed_ohlprod2_ARCH_OHLPROD2_bk_u7vo5ieav_s152831_p1_t811153759:\

-rw-rw---- oracle dba 4225792K Mar 27 2013 Wed_ohlprod2_ARCH_OHLPROD2_bk_u7to5ieav_s152829_p1_t811153759:\

-rw-rw---- oracle dba 3852800K Mar 27 2013 Wed_ohlprod2_ARCH_OHLPROD2_bk_u80o5ieav_s152832_p1_t811153759:\

-rw-rw---- oracle dba 4639744K Mar 27 2013 Wed_ohlprod2_ARCH_OHLPROD2_bk_u7uo5ieav_s152830_p1_t811153759:\

-rw-rw---- oracle dba 66322432 Mar 27 2013 c-1791285659-20130327-01:\

-rw-rw---- oracle dba 46012672K Mar 27 2013 "Wed"_ohlprod2_LEVEL0_OHLPROD2_u7ro5ic06_s152827_p1_t811151366:\

-rw-rw---- oracle dba 46271488K Mar 27 2013 "Wed"_ohlprod2_LEVEL0_OHLPROD2_u7qo5ic05_s152826_p1_t811151365:\

-rw-rw---- oracle dba 48576256K Mar 27 2013 "Wed"_ohlprod2_LEVEL0_OHLPROD2_u7po5ibpe_s152825_p1_t811151150:\

-rw-rw---- oracle dba 44664064K Mar 27 2013 "Wed"_ohlprod2_LEVEL0_OHLPROD2_u7oo5iac8_s152824_p1_t811149704:\

-rw-rw---- oracle dba 44401408K Mar 27 2013 "Wed"_ohlprod2_LEVEL0_OHLPROD2_u7no5ia57_s152823_p1_t811149479:\

-rw-rw---- oracle dba 46512128K Mar 27 2013 "Wed"_ohlprod2_LEVEL0_OHLPROD2_u7mo5ia4e_s152822_p1_t811149454:\

 

 

So, since this data is coming from the NBU catalog, it looks like Netbackup does retain the actual file names. What Im wondering is if there is a way to prove to the DBA's that this data is actually the same as what is on the tape I have recalled.

Yasuhisa_Ishika
Level 6
Partner Accredited Certified

These files bplist shows are not actual files reside in Oracle DB host. These are backup piece handles that RMAN generated at backup following FORMAT option of BACKUP command in your backup script. Only way to get list of actual Oracle files backed up into these backup pieces, is to query on RMAN(list backups, or so on) while catalog for these backup pieces is alive in RMAN catalog. If backup poeces have been already expored from RMAN catalog, you(or DBA) need to recover it anyway. Restoring control files is one way I know to  accomplish it.

To verify wheter each backup images are really kept in tapes, run verify following instructions described as "Verifying backup images" in NetBackup 7.5 Administrator's Guide for Windows page 778.

Toddman214
Level 6

Thank you again, Yasuhisa. The "Verifying backup images" option doesnt seem to work, since the linux client  that hosted these databases no longer exists. When I try to verify, I get a status 48, that the client hostname cannot be found. The DBA's already have another server they will be wanting to restore that data to. I have spoken to them again, and they stated that the list of handle names I added above are what they are looking for. I'll follow up when I hear more from them shortly.

Marianne
Level 6
Partner    VIP    Accredited Certified

Was the linux client  that hosted these databases that no longer exists also a media server?

The verify instruction is sent to the media server that performed the backup.