12-31-2017 04:40 AM
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?
12-31-2017 06:41 AM - edited 12-31-2017 10:43 PM
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!
01-01-2018 08:36 PM
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.
01-01-2018 10:33 PM - edited 01-01-2018 10:38 PM
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)
01-02-2018 12:40 AM
@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.
01-02-2018 01:22 AM
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
01-02-2018 08:22 AM
01-02-2018 11:17 AM
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.
01-02-2018 11:20 AM
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.
01-03-2018 01:00 AM
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.
01-03-2018 01:30 AM
@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.
01-03-2018 01:37 AM
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.
01-03-2018 02:38 AM
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?
01-04-2018 04:55 AM
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.