Skip to main content
Solved

Querying for a list of tapes in a library that are FULL


Forum|alt.badge.img

Hello We used to use EMC Networker as a backup program, and I used to be able to run a command line script that would query for a list of tapes currently in the library, and report on any that were marked as “FULL”. I would send this an email to our tape operators, and they would eject any FULL tapes so they could be sent for offsite storage.

Is there a way I could duplicate this functionality for Veeam? Perhaps run a Powershell script that queries the library and reports on the usage status of the tapes currently in the library? (and if so, has anyone got an example they could point me at? Or a different way of getting the same info for my tape operators?)

Thanks

Best answer by MikeLeone

dips wrote:

Hi @MikeLeone 

I’m not even sure if that will be possible with Veeam. Currently with Veeam you have an option to eject the tape once the job has completed. 

https://helpcenter.veeam.com/docs/backup/vsphere/ejecting_tapes.html?ver=120

The other option would be to query the Veeam Database to determine the status of the tape. This might be useful:

https://forums.veeam.com/powershell-f26/get-tape-content-via-powershell-t22142-60.html

You could then eject the tape depending on the status you get back. The script is quite old, from version 9.5. I’ve not tested it so your milage may vary. 

Cheers,

Dips

Thanks! From doing some quick testing, this seems to tell me the tapes currently in the library that are marked “FULL”.

$LibraryName = "QUANTUM Scalar i3-i6 305G"
Get-VBRTapeMedium -Library $LibraryName | Where {$_.IsFull -eq "TRUE"} | Select Name, LastWriteTime | Sort -Property Name

 

That should be the list that needs to be taken out, the day the script runs, if the goal is to eject tapes that are “FULL”. I wouldn’t want to automate the ejection, as someone needs to physically remove the tapes as there are only so many export slots.

Yeah, I don’t want to eject the tape when the job is done, because another job could still store data on the tape, since there is still room. Those scripts seem to be querying the SQL server directly, which - for my specific use case - is probably vastly overkill. I just want to know what to tell the operator to eject that day. :-)

 

View original
Did this topic help you find an answer to your question?

6 comments

dips
Forum|alt.badge.img+7
  • Veeam Legend
  • 808 comments
  • November 24, 2023

Hi @MikeLeone 

I’m not even sure if that will be possible with Veeam. Currently with Veeam you have an option to eject the tape once the job has completed. 

https://helpcenter.veeam.com/docs/backup/vsphere/ejecting_tapes.html?ver=120

The other option would be to query the Veeam Database to determine the status of the tape. This might be useful:

https://forums.veeam.com/powershell-f26/get-tape-content-via-powershell-t22142-60.html

You could then eject the tape depending on the status you get back. The script is quite old, from version 9.5. I’ve not tested it so your milage may vary. 

Cheers,

Dips


dips
Forum|alt.badge.img+7
  • Veeam Legend
  • 808 comments
  • November 24, 2023

Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 8401 comments
  • November 24, 2023

Further to what Dips has posted not sure if you have ever looked at Veeam ONE but there are tape reports that you could run and schedule to show this I believe.  Then have the tapes ejected.  Another option to consider.


Forum|alt.badge.img
  • Author
  • Comes here often
  • 39 comments
  • Answer
  • November 24, 2023
dips wrote:

Hi @MikeLeone 

I’m not even sure if that will be possible with Veeam. Currently with Veeam you have an option to eject the tape once the job has completed. 

https://helpcenter.veeam.com/docs/backup/vsphere/ejecting_tapes.html?ver=120

The other option would be to query the Veeam Database to determine the status of the tape. This might be useful:

https://forums.veeam.com/powershell-f26/get-tape-content-via-powershell-t22142-60.html

You could then eject the tape depending on the status you get back. The script is quite old, from version 9.5. I’ve not tested it so your milage may vary. 

Cheers,

Dips

Thanks! From doing some quick testing, this seems to tell me the tapes currently in the library that are marked “FULL”.

$LibraryName = "QUANTUM Scalar i3-i6 305G"
Get-VBRTapeMedium -Library $LibraryName | Where {$_.IsFull -eq "TRUE"} | Select Name, LastWriteTime | Sort -Property Name

 

That should be the list that needs to be taken out, the day the script runs, if the goal is to eject tapes that are “FULL”. I wouldn’t want to automate the ejection, as someone needs to physically remove the tapes as there are only so many export slots.

Yeah, I don’t want to eject the tape when the job is done, because another job could still store data on the tape, since there is still room. Those scripts seem to be querying the SQL server directly, which - for my specific use case - is probably vastly overkill. I just want to know what to tell the operator to eject that day. :-)

 


dips
Forum|alt.badge.img+7
  • Veeam Legend
  • 808 comments
  • November 25, 2023
MikeLeone wrote:
dips wrote:

Hi @MikeLeone 

I’m not even sure if that will be possible with Veeam. Currently with Veeam you have an option to eject the tape once the job has completed. 

https://helpcenter.veeam.com/docs/backup/vsphere/ejecting_tapes.html?ver=120

The other option would be to query the Veeam Database to determine the status of the tape. This might be useful:

https://forums.veeam.com/powershell-f26/get-tape-content-via-powershell-t22142-60.html

You could then eject the tape depending on the status you get back. The script is quite old, from version 9.5. I’ve not tested it so your milage may vary. 

Cheers,

Dips

Thanks! From doing some quick testing, this seems to tell me the tapes currently in the library that are marked “FULL”.

$LibraryName = "QUANTUM Scalar i3-i6 305G"
Get-VBRTapeMedium -Library $LibraryName | Where {$_.IsFull -eq "TRUE"} | Select Name, LastWriteTime | Sort -Property Name

 

That should be the list that needs to be taken out, the day the script runs, if the goal is to eject tapes that are “FULL”. I wouldn’t want to automate the ejection, as someone needs to physically remove the tapes as there are only so many export slots.

Yeah, I don’t want to eject the tape when the job is done, because another job could still store data on the tape, since there is still room. Those scripts seem to be querying the SQL server directly, which - for my specific use case - is probably vastly overkill. I just want to know what to tell the operator to eject that day. :-)

 

Got it. Initially, I thought you were going to want to automate the ejecting of the tapes :) 


Forum|alt.badge.img
  • Author
  • Comes here often
  • 39 comments
  • November 29, 2023

UPDATE:

 

This actually *isn’t* what I need. While the above command does show tapes in a pool marked as “FULL”, it does *not* show tapes *currently in the library* that are FULL. I exported the tapes, and running the command again shows the same result. But what I *want* is to show FULL tapes that have *not* been exported yet. This command shows FULL tapes in a pool, whether they are currently physically in the library or not,

So the command needs work, probably more filtering. I will continue to work on it ...


Comment