From:enterprise_support@symantec.com [mailto:enterprise_support@symantec.com]
Sent: Tuesday, August 19, 2008 3:32 PM
To: David McMullin
Subject: Case 291-053-107 (Needs media that matches the restore on Oracle DBA...)
Mr. McMullin,
Good afternoon. My name is Brice Avila, and I am the Symantec technical support engineer currently assigned to your case 291-053-107 concerning how to identify the media needed for an oracle restore. My contact information is below. While I plan to contact you soon, I thought I would first send you an email of commands to try. Please note:
* The Oracle RMAN utility, referencing the control files or RMAN catalog database, knows what backupsets are needed for a restore.
*
While there is an RMAN command that will list the images that a particular backupset resides on, but this list is incomplete if an image spans several media. (MY EMPHASIS)
* Only RMAN knows what backup pieces are needed for a restore.
* If we know what backup pieces are requested, we can use NetBackup commands to locate the media these backup pieces reside on.
Using your list of backup piece ids, probably the best command to use is 'bpclntcmd'.
Unfortunately this command is undocumented and unsupported, but it has been known to work well. It must be executed from the Oracle client either as user root or the owner of the Oracle backup images(MY EMPHASIS) (see output from bplist -l). For example:
/usr/openv/netbackup/bin/bpclntcmd -ml <filename> -ct Oracle
$ bpclntcmd -ml /bk_1727_1_588103217 -ct Oracle
1 1 DLT004
1 2 DLT004
1 3 DLT004
1 4 DLT004
1 5 DLT004
The search can be made more concise by specifying the start and end times for the search. The default is to look from time = 0 to the present.
$ bpclntcmd -ml /bk_1727_1_588103217 -ct Oracle -s 04/01/06 -e 04/19/06
Please note that with a slightly different syntax it can expire the image, deleting it from the NetBackup catalog.
$ bpclntcmd -di /bk_1727_1_588103217 -ct Oracle
More about this bpclntcmd command can be found on page 47 of the ‘NetBackup 6.5 Troubleshooting Guide for UNIX, Linux and Windows’ located at ‘http://support.veritas.com/docs/290230’. More about the bplist command can be found on page
* 178 of the ‘NetBackup 6.5 Commands for UNIX’ located at ‘http://support.veritas.com/docs/290234’
* 170 of the ‘NetBackup 6.5 Commands for Windows’ located at ‘http://support.veritas.com/docs/290235’
There are two other ways to make a good educated guess:
1. One of the easiest ways would be display the ‘Images On Media’ report and specify the narrowest criteria to isolate the client, policy, schedule, and date range when the backup(s) occurred.
bpimmedia -L -client name -policy name -sl sched_name -d date -e date
More about this bpimmedia command is found on page
* 145 of the ‘NetBackup 6.5 Commands Guide for UNIX and Linux’ located at ‘http://support.veritas.com/docs/290234’
* 138 of the ‘NetBackup 6.5 Commands for Windows’ located at ‘http://support.veritas.com/docs/290235’
2. A less user friendly listing can be obtained using the following command. However, it supports some additional command options that can be used to further filter the image selection criteria
bpimagelist -l -client name -pt Oracle | grep FRAG | cut -f9 -d' ' | sort | uniq
or
bpimagelist -L -client name -pt Oracle | egrep ' ID:|Backup Time:'
More about this bpimagelist command is found on page
* 137 of the ‘NetBackup 6.5 Commands Guide for UNIX and Linux’ located at ‘http://support.veritas.com/docs/290234’
* 131 of the ‘NetBackup 6.5 Commands for Windows’ located at ‘http://support.veritas.com/docs/290235’