Expired Media Report

Everything about backing up to tape

Re: Expired Media Report

Veeam Logoby squirtleuk » Thu Jun 11, 2015 12:08 pm

Sorry that still comes back with no results, but i know they should be two tapes which expired this morning. Currently they are out of the library.
squirtleuk
Novice
 
Posts: 7
Liked: never
Joined: Tue Jun 09, 2015 1:46 pm
Full Name: Alan Bailey

Re: Expired Media Report

Veeam Logoby squirtleuk » Thu Jun 11, 2015 12:21 pm

The result is still empty, but I know two tapes expired this morning. They are not currently in the library.

Thank you for all your assistance so far.
squirtleuk
Novice
 
Posts: 7
Liked: never
Joined: Tue Jun 09, 2015 1:46 pm
Full Name: Alan Bailey

Re: Expired Media Report

Veeam Logoby v.Eremin » Thu Jun 11, 2015 1:53 pm

What about this script; it should list names of tapes that are not located inside slot, nor inside drive. In other words, it will list mediums that are offline or located inside vault.

Code: Select all
Get-VBRTapemedium | where {($_.IsExpired -eq $True) -and ($_.location.type -ne "Slot") -and ($_.location.type -ne "Drive")} | select Name


Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Expired Media Report

Veeam Logoby Tarqy » Tue Dec 15, 2015 10:00 am

Sorry to bump an old thread but is this reporting functionality still not part of the product and is a script required?

I want to be able to generate a list of expired vault media to bring back from storage and have this sent via email each morning to our tape storage provider.
VMCE
Tarqy
Service Provider
 
Posts: 24
Liked: 3 times
Joined: Fri Aug 08, 2014 1:51 pm
Full Name: Barry Knox

Re: Expired Media Report

Veeam Logoby v.Eremin » Tue Dec 15, 2015 10:08 am 1 person likes this post

Sorry to bump an old thread but is this reporting functionality still not part of the product and is a script required?

It's a part of Availability Suite. Take a look at Tape Vaults report. Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Expired Media Report

Veeam Logoby Tarqy » Tue Dec 15, 2015 10:14 am

and if you don't have availability suite?
VMCE
Tarqy
Service Provider
 
Posts: 24
Liked: 3 times
Joined: Fri Aug 08, 2014 1:51 pm
Full Name: Barry Knox

Re: Expired Media Report

Veeam Logoby v.Eremin » Tue Dec 15, 2015 10:32 am

Then, use "Vaults" node to check what mediums are already expired and can be taken back to library. Or leverage the script, instead, to obtain this information automatically.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Expired Media Report

Veeam Logoby Tarqy » Tue Dec 15, 2015 10:39 am

Will this functionality ever be part of B&R? I can appreciate you have a report in Veeam ONE but surely this functionality should not be limited to having to purchase an additional product?
VMCE
Tarqy
Service Provider
 
Posts: 24
Liked: 3 times
Joined: Fri Aug 08, 2014 1:51 pm
Full Name: Barry Knox

Re: Expired Media Report

Veeam Logoby Vitaliy S. » Tue Dec 15, 2015 11:23 am

Doubt it, all predefined reports on backup infrastructure as well as virtual infrastructure will stay in Veeam ONE (part of Availability Suite). If you don't have this product installed, then PowerShell should be a way to go. Thanks!
Vitaliy S.
Veeam Software
 
Posts: 19539
Liked: 1097 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Expired Media Report

Veeam Logoby Tarqy » Tue Dec 15, 2015 11:50 am

Since you're the product manager I'd like to highlight my concern about this then.

Veeam B&R has tape support but its severely lacking when it comes to tape management and this functionality really needs to be something that is standard without any additional product. I know we are calling it a "report" but its actually a critical part of tape management and as such I would have thought that should be part of B&R.

At the end of the day its simply a list of tapes that either need to go offsite or be returned when they have expired, Its really no different to the backup failure notifications and these don't require an additional product.

I appreciate you can view the vault and look up this information manually but that is far from ideal. The customer I'm currently working with uses a 3rd party provider for tape storage and that 3rd party simply want a list of tapes they should be returning to site each day.

I'll stick with the script as it does the same thing but I personal think its the wrong decision. Veeam is great because its easy to use and for the most part just works but having to create power shell scripts to gather what should be standard information falls short of that ethos.
VMCE
Tarqy
Service Provider
 
Posts: 24
Liked: 3 times
Joined: Fri Aug 08, 2014 1:51 pm
Full Name: Barry Knox

Re: Expired Media Report

Veeam Logoby Vitaliy S. » Tue Dec 15, 2015 5:16 pm 1 person likes this post

Hi Barry,

Thanks for your feedback on this. I do agree that there might be some features missing, that's why we have made lots of improvements for tape management in the upcoming version of Veeam B&R.

If you look through these forums, you will notice that lots of people are asking for different tape reports. We do monitor these requests and then make predefined templates for each and every request. Currently Veeam ONE covers all "core" tape reporting scenarios, moreover, we are adding 3 additional reports for tape management to support new functionality of v9.

Veeam B&R is not a reporting tool, but it does provide a way to get the required information via PowerShell, Windows Event log, Enterprise Manager and email notifications. If automatic report generation, report customization for specific needs is required, then a tool which was specifically built for these purposes (100+ predefined reports) should be used.

Hope this makes sense. Thanks!
Vitaliy S.
Veeam Software
 
Posts: 19539
Liked: 1097 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Expired Media Report

Veeam Logoby nullifi » Thu Dec 17, 2015 9:18 pm

Tarqy wrote:I want to be able to generate a list of expired vault media to bring back from storage and have this sent via email each morning to our tape storage provider.


I created a script to do that, if you're interested. For my scenario, I request a particular amount of expired tapes and then sit them on the shelf where they will eventually be put in the library. When I just mark a tape in the off site vault as free it still remains in that vault until Veeam sees it in the library. I didn't want that so I created a new vault for on site free tapes. The script will move the requested tapes to that vault then mark them as free. I have this set to be executed daily via a scheduled task in the early morning.

Code: Select all
Add-PSSnapin VeeamPSSnapin

# Email recipients
$Recipients = @(
"one@example.com",
"two@example.com"
)

# Vault ID of the off site vault to request tapes from
# Find via Get-VBRTapeVault | select name, id
$OffsiteVaultId = '676a551a-c262-43d7-bbd0-d017cb51bea3'

# Free media vault and free media pool ID's
# Find via: Get-VBRTapeMediaPool | select name, id
# and Get-VBRTapeVault | select name, id
$FreeVault = Get-VBRTapeVault -Id '8fa019ac-6fdd-43f8-b992-dcc5e3028363'
$FreePool = Get-VBRTapeMediaPool -Id '759d84f2-83bb-48e0-abcb-e55d3ad500b7'

# Get list of expired tapes
$ExpiredTapes = Get-VBRTapeMedium | Where-Object {
    $_.IsExpired -eq $True -and $_.Location.VaultId -eq $OffsiteVaultId
} | Sort Name | Select-Object -First 10

# Move expired tapes to the Free Vault
$ExpiredTapes | ForEach-Object {Move-VBRTapeMedium -Medium $_ -Vault $FreeVault}

# Then move to free media pool
$ExpiredTapes | ForEach-Object {Move-VBRTapeMedium -Medium $_ -MediaPool $FreePool}

$Body = "Tape request:`n`n"

$ExpiredTapes | Sort | ForEach-Object { $Body += "$($_.name)`n" }

$Body += "`nTotal Tapes: $($ExpiredTapes.Count)"

Send-MailMessage -To $Recipients -From 'TapeRequest@example.com' -Subject "Tape Request for $(Get-Date -UFormat "%m/%d/%Y")" -SmtpServer 'smtp.example.com' -Body $Body
nullifi
Influencer
 
Posts: 23
Liked: 5 times
Joined: Wed Aug 05, 2015 1:41 pm
Full Name: Jason Taylor

Re: Expired Media Report

Veeam Logoby Tarqy » Tue Mar 08, 2016 3:58 pm

v.Eremin wrote:What about this script; it should list names of tapes that are not located inside slot, nor inside drive. In other words, it will list mediums that are offline or located inside vault.

Code: Select all
Get-VBRTapemedium | where {($_.IsExpired -eq $True) -and ($_.location.type -ne "Slot") -and ($_.location.type -ne "Drive")} | select Name


Thanks.


This script is working and provides a list of tapes but I need to take into account that cannot return some expired tapes until the rest of the weekly chain has expired, Is anyone able to give me an idea of how to account for this?
VMCE
Tarqy
Service Provider
 
Posts: 24
Liked: 3 times
Joined: Fri Aug 08, 2014 1:51 pm
Full Name: Barry Knox

Re: Expired Media Report

Veeam Logoby cloudy » Wed Mar 16, 2016 10:01 pm

Perhaps you could evaluate the media set expiration date:

Code: Select all
$date = (get-date -format MM/dd/yy)
$time = (get-date -format HH:mm:ss)
Get-VBRTapemedium | where {($_.ExpirationDate -gt ($date+" "+$time) -and ($_.IsExpired -eq $True) -and ($_.location.type -ne "Slot") -and ($_.location.type -ne "Drive")} | select Name


I'm using the below script which I wrote to tell me how many tapes need to be exported and how many tapes I have available for import along with the bardcode of the tape. This could be easily modified to tell you any additional info. I only have one vault so you'll need to modify the logic to meet your needs. The report is an html formatted email.

Code: Select all
asnp VeeamPSSNapin
$date = (get-date -format MM/dd/yy)
$time = (get-date -format HH:mm:ss)

#find number of tapes free, available to import into library
$tapeList = Get-VBRTapeMedium | where {$_.IsExpired -eq $true -and $_.Location -like "Vault"} | Sort-Object {$_.barcode} #|format-table -autosize -property {$_.barcode}, {$_.isexpired}, {$_.expirationdate} #Get expired tapes

#display message if no tapes are available for import
if ($tapeList.count -eq 0) {
    $tapeList = New-Object psobject
    $tapeList| add-member noteproperty barcode "Not tapes available for import"
}
#find number of tapes to export, tapes already written to
$tapes = Get-VBRTapeMedium | where {($_.ExpirationDate -gt ($date+" "+$time) -and $_.Location -like "Slot" -or $_.Location -like "Drive")}| Sort-Object {$_.barcode}

$head=@"
<style>
@charset "UTF-8";

#content {
width:75%;
border:0px solid #005a99;
padding-left:50px;
}
 
h2 {
   color:#0888d8;
}

h3 {
   color:#0888d8;
   font-size:x-large;
}

p {
   font-size:large;
   font-weight: bold;
   padding-bottom: 0px;
}

.red {
   color:#cc0000;
   font-size:large;
   font-weight: bold;
   padding-bottom: 0px;
}

.green {
   color:#4caf50;
   font-size:large;
   font-weight: bold;
   padding-bottom: 0px;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    text-align: left;
    padding: 8px;
}

tr:nth-child(odd){background-color: #f2f2f2}

th {
    background-color: #4caf50;
    color: white;
}

</style>
"@

$htmlbody = $tapeList | Select @{Name="Tape Barcode";Expression={$_.Barcode}},@{Name="Expiration Date";Expression={$_.ExpirationDate}},@{Name="Expired Status";Expression={$_.IsExpired}} | ConvertTo-HTML -Head $head -PreContent "<div id=""content"" class=""transparent""><H2>Veeam Backup Report - Import Tape List $($date)</H2><div class=""red"">Number of tapes to export: $($tapes.count)</div><div class=""green"">Number of tapes available for import: $($tapeList.count)</div><h3>Available tapes for import:</h3>" -PostContent "</div>"| out-string

#use as sample output file
#$htmlbody | Out-File -FilePath ".\html.htm"

$emailSender = "<sender_email_address>"
[string[]]$emailRecipients = "<email_recipients>" #comma delimited: "user1@example.com","user2@example.com"
$emailSubject = "Veeam Backup Report - Import Tape List $(date)"
$smtpServer = "<smtp_server>"
Send-MailMessage -From $emailSender -Subject "$($emailSubject)" -To $emailRecipients -Body $htmlbody -BodyAsHtml -SmtpServer $smtpServer


To use change the following variable values:
$emailSender
$emailRecipients
$smtpServer
cloudy
Novice
 
Posts: 4
Liked: 1 time
Joined: Wed Mar 16, 2016 8:42 pm

Re: Expired Media Report

Veeam Logoby Dima P. » Mon Mar 21, 2016 9:19 pm

Hi cloudy,

This might be a bit outdated question, but have you seen the latest Tape Media Retention Period report from Veeam One v9? It should provide a great overview of the expired media and it's location, so worth checking.
Dima P.
Veeam Software
 
Posts: 6231
Liked: 439 times
Joined: Mon Feb 04, 2013 2:07 pm
Location: SPb
Full Name: Dmitry Popov

Previous

Return to Tape



Who is online

Users browsing this forum: No registered users and 8 guests