cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

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

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?

Tags (2)
13 Replies
Highlighted

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

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!

Highlighted

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

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.

Highlighted

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

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)

Highlighted

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


@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.

 

Highlighted

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

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

Highlighted

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

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
Highlighted

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

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 8.1.2 on Solaris 11, writing to DataDomain 9800 6.0.2.50
duplicating via SLP to LTO5 in SL8500 via ACSLS
Tags (2)
Highlighted

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

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 8.1.2 on Solaris 11, writing to DataDomain 9800 6.0.2.50
duplicating via SLP to LTO5 in SL8500 via ACSLS
Tags (2)
Highlighted

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

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:MMSmiley FrustratedS -e mm/dd/yyyy HH:MMSmiley FrustratedS -media

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

Highlighted

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


@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:MMSmiley FrustratedS -e mm/dd/yyyy HH:MMSmiley FrustratedS -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.

Highlighted

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


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. 

 

Highlighted

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

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?

Highlighted

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

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.