cancel
Showing results for 
Search instead for 
Did you mean: 

how to predict what tapes are required for an RMAN restore?

manatee
Level 6

i find this odd.

from the catalog or from CLI, when i queried for the tapes required for a restore it told me only 3 tapes. which i got from storage and loaded in the robot. now, a few minutes after RMAN restore was started, it asks for 2 more additional tapes! why? this is worrisome because you could have gone home and sleep and only to find out the next morning that the restore is waiting for more tapes to be loaded.

is there anyway to find out all the tapes required for an RMAN restore?

13 REPLIES 13

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified

One of the questions that might address this would be - do you use RMAN catalog or not? If everything is based on s/pfiles then it's impossible to say which SCN will be the last UNTIL the pfile is restored and target set of logs is established!

Amol_Nair
Level 6
Employee

You could try using the RMAN command - RESTORE DATABASE PREVIEW;

It would not perform an actual restore of the database but would provide you information on what is to be restored and from where.

Not sure if this would be helpful or not, but I believe it would list the tapes that would be required for the restore. Running a "restore database validate" would kind of simulate a complete restore and would take longer to complete.

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified

Just wanted to add - this is an awesome command, however I think it will only work when RMAN catalog was used. Otherwise a controlfile has to be restored first to find out the required SCN (and then this command can be used as well, IIRC)


@Mouse wrote:

Just wanted to add - this is an awesome command, however I think it will only work when RMAN catalog was used. Otherwise a controlfile has to be restored first to find out the required SCN (and then this command can be used as well, IIRC)


what command? actually all this is greek to me as far as RMAN is concerned but when you mentioned controlfile, yeah that's the first thing they would restore first. so i guess they're not using RMAN catalog.

 

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified

apologies for not being clear in here - Oracle restores are driven from clients and RMAN CLI, hence the discussion about RMAN. Unfortunately NBU catalog posess very limited information about what is in control file (or RMAN catalog if it is used), hence unless you run a query from the Oracle side, you don't know which backup sets will be required for restore

Amol_Nair
Level 6
Employee
Yes as long as either a control file or a recovery catalog is there the command should be good I believe so..

since rino had mentioned regarding restores I assumed that they already have the control file restored..

@manatee after the control file is restored, try connecting to rman and from rman prompt run the below command

RMAN> RESTORE DATABASE PREVIEW;

hope this helps

Genericus
Moderator
Moderator
   VIP   

I have this undocumented gem, which used to work, haven't tested since 5.X

# To find media to restore for oracle clients by Oracle block file - ON THE CLIENT run this command:
/usr/openv/netbackup/bin/bpclntcmd -ml /db_717_1_662950820 -ct Oracle
# if you have dates you can add -s mm/dd/yy

This will output the media list. I know this used to work. 

NetBackup 9.1.0.1 on Solaris 11, writing to Data Domain 9800 7.7.4.0
duplicating via SLP to LTO5 & LTO8 in SL8500 via ACSLS

Genericus
Moderator
Moderator
   VIP   

Also - 99% of my RMAN backup/restore issues have been caused by typo's - amazing how having a bad date will cause it to request extra tapes! Mistyping the client or policy name can also cause issues.

We now write everything into a file and copy and paste, so we can review, edit and retry.

 

NetBackup 9.1.0.1 on Solaris 11, writing to Data Domain 9800 7.7.4.0
duplicating via SLP to LTO5 & LTO8 in SL8500 via ACSLS

quebek
Moderator
Moderator
   VIP    Certified

Hi

Why not address this as an ordinary backup? So you do know from what date the restores will be, right? Also you do know the policy name used with backups you will be using as well client name... In that case I would ran this:

bpimagelist -client your_client_name_as_is_in_policy -policy policy_name -d mm/dd/yyyy HH:MM:SS -e mm/dd/yyyy HH:MM:SS -media

last swtich will show you media IDs and if you will replace it with -U you will see backup images, that's all.


@quebek wrote:

Hi

Why not address this as an ordinary backup? So you do know from what date the restores will be, right? Also you do know the policy name used with backups you will be using as well client name... In that case I would ran this:

bpimagelist -client your_client_name_as_is_in_policy -policy policy_name -d mm/dd/yyyy HH:MM:SS -e mm/dd/yyyy HH:MM:SS -media

last swtich will show you media IDs and if you will replace it with -U you will see backup images, that's all.


that's the CLI equivalent of the GUI or catalog. same result produces only 3 tapes but the actual restore used 5 tapes.

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified

Why not address this as an ordinary backup? So you do know from what date the restores will be, right? Also you do know the policy name used with backups you will be using as well client name... In that case I would ran this:

This might not work when restoring to a specific SCN and with incremental backups, there might be a requirement for logs that have been backed up earlier, however this approach should work well for full restores where date of last full backup is well-known. 

 

quebek
Moderator
Moderator
   VIP    Certified

Hi

So looks like there was something else requested... and as Mouse stated depends on other INC backups etc...

Are you able to check what were these two additional tapes having on them? Why these were requested? Any idea?

Dates need to be defined as they play an important role while performing RMAN restores. Please coordinate with your database admin to get the correct date from which the restore needs to be performed.

Netbackup is only a media handler when it comes to RMAN backups everything else is taken care by RMAN itself hence very little is known from Netbackup..

Usually the restores needs to be performed using the FULL backups followed by Incrementals.