Forum Discussion

Dion's avatar
Dion
Level 6
16 years ago

Which tape hold a SQL DB Backup?

Hi all

Does anyone know how to find out which tape an SQL database is sitting on without actually starting up a restore?

For some reason I can't find an easier way to determine this.

1. If you look BAR console on the master server you can't check what tape is used or determine what the backup id is.  This only contains a date/time-type stamp in the backup name and select the check media icon doesn't tell which tapes it resides on.
2. If you use the SQL interface on the client, it only shows the same date/time-type stamp for the selected database (same date/time as the BAR console)
3. If you run a bpimagelist you can filter the backup id's for the host but can't link it up to a specific database.
4. If you run the catalog utility in the NetBackup Console, you can do the same as bpimagelist but you also can't link the backups to databases.

It seems a little archaic to have to start a restore job then check the logs to find out which tapes are requested.

Thanks in advanced

  • I would suggest:

    1: Find the NBIMAGE id from MS SQL you want to restore.

    2: Use bpflist command to find the netbackup image id, narrow down time frame as much as possible. Match the FN line from bpflist with the one you got from SQL server.  This will give you the Netbackup image id.

    3: Use bpimagelist to find the tapes (look for the line starting with FRAG, media id is field 8).

    This the the non GUI way to do it ;-)

    Regards

    Nicolai

  • Depending on version and if it is windows or UNIX.
    On the widows BAR Gui to the left there is an icon with tapes and cd "Preview media Required for Restore"  or go to ACTIONS Preview.

    Some early windows versions did not have this but the UNIX and java did.
    I know windows 6.5 DOES have the preview.
  • Hi J

    I'm running NetBackup 6.5.1 on Windows 2K3 x86 and Preview Media Required button doesn't work for SQL databases.  It works for all other backups in the environment including Exchange application backups but not for SQL application backups.  This also seems to be the case for our Dev environment which is running 6.5.2A on Windows 2K3.

    Cheers
  • On the admin console, click on catalog, select Verify

    For Policy type, select MS-SQL-SERVER

    Set the correct time range and the correct client.

    This will hopefully give you what you need.

  • Hello
    Try to use bpimmedia command:
    bpimmedia: unrecognized option --
    USAGE: bpimmedia [-L|-l] [-disk|-tape]
    [-policy policy_name] [-client client_name]
    [-d mm/dd/yyyy HH:MM:SS][-e mm/dd/yyyy HH:MM:SS]
    [-mediaid media_ID|path_name] [-mtype image_type]
    [-option option_name]
    [-rl retlevel] [-sl sched_label] [-t sched_type]
    [-disk_stu storage_unit_label |
    [-dt disk_type | -stype storage_server_type
    [-dp disk_pool [-dv disk_volume]][-legacy]]]
    [-verbose] [-M master_server...]
    bpimmedia -spanpools [-mediaid media_ID] [-U] [-cn copy_number]

    Let us know if this helped.

  • I would suggest:

    1: Find the NBIMAGE id from MS SQL you want to restore.

    2: Use bpflist command to find the netbackup image id, narrow down time frame as much as possible. Match the FN line from bpflist with the one you got from SQL server.  This will give you the Netbackup image id.

    3: Use bpimagelist to find the tapes (look for the line starting with FRAG, media id is field 8).

    This the the non GUI way to do it ;-)

    Regards

    Nicolai

  • Hi guys

    Thanks for your help on this.  Nicolai, it seems that your way is the closest I can get to a solution.  It seems like a pretty mean workaround but it works (thanks).  What I did (as a reference for anyone else) is the following.

    bpflist -L -client <clientname> -pt MS-SQL-Server -d 01/28/2009 18:00:00 -e 02/01/2009 23:00:00 | grep -i <dbname> -B 15 | grep "Backup ID:"

    This extracts the backup ID of the backup for that specific database.  You then run a normal bpimagelist to get the tape numbers/disk locations etc.

    bpimagelist -L -backupid <clientname> |grep -w " ID:"


    Thanks again