cancel
Showing results for 
Search instead for 
Did you mean: 

Script to find tapes used in library

hargy
Level 3

Hello

We are starting to have our tapes taken off site and I am looking to automate the process with this in mind I have been looking at bpmedialist options so the 3rd party knows which tpaes need to be removed.  I have used bpmedialist command and outputted this to a text file and a this is then sent by email.   However this shows the last14 days worth of tapes. 

Is it possible to get only the tapes in the libaray itself and when they were last used??

many thanks

 

Paul

1 ACCEPTED SOLUTION

Accepted Solutions

quebek
Moderator
Moderator
   VIP    Certified

Most probably you are writing certain backups to certain volume pools. Mine scripts for the same are looking after tapes in certain volume pool and if the tape is inside library. If it is in library its on pickup list to ours 3rd vendor.

example of script I wrote and using several years now -its wintel example:

@echo off
echo TAPES TO BE EJECTED FROM LIBRARY

echo What SAP tapes are in library:
vmquery -pn XXX_SAP -b|findstr "TLD"

echo ===================================

echo What Catalog tapes are in library:
vmquery -pn XXX_CATALOG -b|findstr "TLD"
echo ===================================


echo What Yearly tapes are in library:
vmquery -pn XXX_YEARLY -b|findstr "TLD"

echo ===================================

echo What Monthly tapes are in library:
vmquery -pn XXX_MONTHLY -b|findstr "TLD"
echo ===================================

echo What Weekly tapes are in library:
vmquery -pn XXX_WEEKLY -b|findstr "TLD"
echo ===================================
echo ===================================
echo ===================================

echo TAPES TO BE BROUGHT BACK INTO LIBRARY

echo What tapes are in scratch pool OUTside the library
vmquery -pn XXX_SCRATCH -b|findstr "NONE"
echo ===================================

echo What tapes are in scratch pool INside the library
vmquery -pn XXX_SCRATCH -b|findstr "TLD"
echo ===================================

 

You got the idea? Of course is valid if you do have robotic type of TLD, if ACS or THL.... you need to change the string you are looking after.

Also you can use this bpimagelist -hoursago 24 -media

but this is less specific....

 

View solution in original post

4 REPLIES 4

Marianne
Level 6
Partner    VIP    Accredited Certified

Try 'media written' report.

See http://www.symantec.com/docs/TECH1672

/usr/openv/netbackup/bin/admincmd/bpimagelist -A -media -d mm/dd/yy hh:mm:ss -e mm/dd/yy hh:mm:ss 

quebek
Moderator
Moderator
   VIP    Certified

Most probably you are writing certain backups to certain volume pools. Mine scripts for the same are looking after tapes in certain volume pool and if the tape is inside library. If it is in library its on pickup list to ours 3rd vendor.

example of script I wrote and using several years now -its wintel example:

@echo off
echo TAPES TO BE EJECTED FROM LIBRARY

echo What SAP tapes are in library:
vmquery -pn XXX_SAP -b|findstr "TLD"

echo ===================================

echo What Catalog tapes are in library:
vmquery -pn XXX_CATALOG -b|findstr "TLD"
echo ===================================


echo What Yearly tapes are in library:
vmquery -pn XXX_YEARLY -b|findstr "TLD"

echo ===================================

echo What Monthly tapes are in library:
vmquery -pn XXX_MONTHLY -b|findstr "TLD"
echo ===================================

echo What Weekly tapes are in library:
vmquery -pn XXX_WEEKLY -b|findstr "TLD"
echo ===================================
echo ===================================
echo ===================================

echo TAPES TO BE BROUGHT BACK INTO LIBRARY

echo What tapes are in scratch pool OUTside the library
vmquery -pn XXX_SCRATCH -b|findstr "NONE"
echo ===================================

echo What tapes are in scratch pool INside the library
vmquery -pn XXX_SCRATCH -b|findstr "TLD"
echo ===================================

 

You got the idea? Of course is valid if you do have robotic type of TLD, if ACS or THL.... you need to change the string you are looking after.

Also you can use this bpimagelist -hoursago 24 -media

but this is less specific....

 

hargy
Level 3

Marianne, thanks for that and quebak bpimagelist -hoursago 24 -media works great it is literally all I needed was these are the tapes that have been written too.

 

 

Nicolai
Moderator
Moderator
Partner    VIP   

Please consider to mark both Marianne & Quebak post as a soloution (use "request split soloution).