Discussions related to exporting backups to tape and backing up directly to tape.
timmi2704
Expert
Posts: 100 Liked: 5 times
Joined: Jan 14, 2014 10:41 am
Full Name: Timo Brandt
Contact:
Post
by timmi2704 » Apr 20, 2015 9:34 am
this post
Hi forum,
do you know of any possibiltiy to see the amount of free tape slots available in a library only by using Veeam functions given either in Veeam Backup Shell or in PowerShell?
Before importing tapes, I always need to have a look onto the tape libraries web interface whether all tapes will fit.
Thanks
Dima P.
Product Manager
Posts: 14818 Liked: 1771 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:
Post
by Dima P. » Apr 20, 2015 4:19 pm
this post
Hello Timo,
I am not an expert, but, I believe, you can run a tape inventory via PS to check the loaded media:
Start-VBRTapeInventory
veremin
Product Manager
Posts: 20673 Liked: 2379 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Apr 21, 2015 9:13 am
this post
In the way I see it, it might be worth taking information regarding library free slots' directly from library, using vendor specific commandlets (if available). Thanks.
timmi2704
Expert
Posts: 100 Liked: 5 times
Joined: Jan 14, 2014 10:41 am
Full Name: Timo Brandt
Contact:
Post
by timmi2704 » Apr 22, 2015 7:14 am
this post
Hi,
thanks Dmitry and Vladimir.
As far as I can see, getting the information through Veeam is not possible.
Using vendor commandlets will be the only option. Unfortunately it seems as if there aren't any cmdlets available.
May I ask for such a feature as a feature request?
Having an overview of all tape slots either occupied or emtpy would be nice to have.
Thanks
veremin
Product Manager
Posts: 20673 Liked: 2379 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Apr 22, 2015 9:07 am
this post
Ok, your request has been heard. Just out of curiosity - what tape device are you using?
timmi2704
Expert
Posts: 100 Liked: 5 times
Joined: Jan 14, 2014 10:41 am
Full Name: Timo Brandt
Contact:
Post
by timmi2704 » Apr 22, 2015 9:10 am
this post
Thanks. I am using Quantum Scalar tape libraries with HP drives.
veremin
Product Manager
Posts: 20673 Liked: 2379 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Apr 22, 2015 9:52 am
this post
Can't find any information regarding automation tools for the said device. However, I believe you can get number of free slots in unobvious way, using VB&R PS snap-in. Query library to get number of slots it has, then, receive list of mediums that occupy slots inside given library, after that, subtract the second number from the first one. The resulting value should be the number you're looking for.
If you struggle with scripting, kindly, create separate topic on corresponding subforum (PowerShell), and I will try to assist you with that.
Thanks.
timmi2704
Expert
Posts: 100 Liked: 5 times
Joined: Jan 14, 2014 10:41 am
Full Name: Timo Brandt
Contact:
Post
by timmi2704 » Apr 28, 2015 10:31 am
1 person likes this post
Sometimes you miss the wood for the trees...
Thanks Vladimir.
In case anyone is interested, feel free to use my small PowerShell script:
Code: Select all
###########################################################################
#
# NAME: Get-VBRFreeTapeSlots
#
# AUTHOR: timmi2704
#
# COMMENT: This PS-Script will give you the free tape slots of all libraries installed in Veeam console
#
# VERSION HISTORY:
# 1.0 28.04.2015 - Initial release
#
###########################################################################
cls
#Adding Veeam PowerShell Snapin
if ((Get-PSSnapin "VeeamPssnapin" -ErrorAction SilentlyContinue) -eq $null)
{
Write-Host "Adding Veeam PS Snapin..." -Foregroundcolor White
Add-PSSnapin "Veeampssnapin"
Write-Host "Completed!" -Foregroundcolor White
Write-Host ""
}
else
{
Write-Host "Veeam PS Snapin already added." -Foregroundcolor White
Write-Host ""
}
#Function for getting occupied tape librarie slots (including tapes in drives)
function Get-VBRAvailableTapes($TL) {
return Get-VBRTapeMedium -Library $TL | Where-Object { $_.Location -like 'Slot' -OR $_.Location -like 'Drive' }
}
#Getting installed tape libraries
Write-Host -ForegroundColor yellow "Getting installed tape libraries..."
$TapeLibraries = Get-VBRTapeLibrary
$TapeLibraries | Foreach-Object { Write-Host $_ }
If ($TapeLibraries -eq $null) {
Write-Host -ForegroundColor Red "No libraries found!"
pause
exit
}
Write-Host ""
#Listing online media
foreach ($TapeLibrary in $TapeLibraries) {
Write-Host -ForegroundColor Yellow -NoNewline "Listing online media for" $TapeLibrary.Name
Get-VBRAvailableTapes($TapeLibrary) | Sort-Object -property Barcode |ft -Property Barcode, Location, ExpirationDate -AutoSize
}
#Calculating free slots per librarie
foreach ($TapeLibrary in $TapeLibraries) {
$AvailableTapes = Get-VBRAvailableTapes($TapeLibrary)
$FreeSlots = ($TapeLibrary.Slots - $AvailableTapes.count)
Write-Host -ForegroundColor Yellow -NoNewline "Free slots in" $TapeLibrary.Name": "
Write-Host -ForegroundColor White $FreeSlots
}
function pause {
Write-Host "Please press RETURN to continue..."
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}
pause
veremin
Product Manager
Posts: 20673 Liked: 2379 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Apr 28, 2015 12:28 pm
this post
Nice script, indeed. Thank you for sharing.
Glad to hear that my input was helpful.
Users browsing this forum: No registered users and 63 guests