Expired Media Report

Everything about backing up to tape

Expired Media Report

Veeam Logoby mcafeej » Fri Mar 07, 2014 6:48 pm

I am using a GFS backup rotation on tape and I have three media pools setup. I have a Daily with a retention of 6 days, Weekly with a retention of 4 weeks and a Monthly with a retention of 12 months. After the backup is complete the tapes are moved offsite until the retention schedule is up, however I don't see any reports or any easy way of telling what tapes are expired and ready to return to the tape library.

I have a 8 slot Quantum Superloader 3 LTO 5 so my onsite media storage is slim inside the library. When I was using BackupExec it generated a report of the media that is scheduled to return from the vault or offsite storage. My Veeam version is 7.0.0.839

What is our options with Veeam?
mcafeej
Influencer
 
Posts: 18
Liked: 3 times
Joined: Wed Nov 02, 2011 4:03 pm
Full Name: Jesse McAfee

Re: Expired Media Report

Veeam Logoby v.Eremin » Sun Mar 09, 2014 4:41 pm

HI, Jesse, I believe you can achieve what you're after with little PS scripting. The following script will list tape medium that have expired protection period:

Code: Select all
asnp VeeamPSSnapin
Get-VBRTapeMedium | Where-Object { $_.IsOverwriteProtectionPeriodOver() -eq $True}

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 mcafeej » Mon Mar 10, 2014 12:58 pm

That did work, thanks for the help!

Is there any future enhancements that might include reports of expired media that is scheduled to return to library sent via email? I really think that would be a great feature, especially for those of us who have rather large rotation of tapes.

Also it would be a great feature to have the ability to specify vault(s) for offsite storage after a tape is exported. Especially when dealing with external auditors you can show them where your tapes are located without keeping manual log sheets.
mcafeej
Influencer
 
Posts: 18
Liked: 3 times
Joined: Wed Nov 02, 2011 4:03 pm
Full Name: Jesse McAfee

Re: Expired Media Report

Veeam Logoby Vitaliy S. » Mon Mar 10, 2014 1:02 pm

Hi Jesse,

Yes, we are planning to enhance our reporting functionality in terms of tape support. This report should be part of Veeam ONE solution.

BTW, if you already have a report (or you want to see any other report) that does exactly what you want, can you please share it with us?

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 v.Eremin » Mon Mar 10, 2014 1:27 pm

As to tape vault feature, we're currently working on it. According to the plan, it should be delivered in one of the next product releases. 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 mcafeej » Thu Mar 13, 2014 7:24 pm

This is what I have come up with that works for me, until Veeam provides some tape reporting in future releases.

I saved this script on my backup server and run a scheduled task daily at 8:00 AM so I can prepare any tapes that needs to be brought back from our remote tape vault.
This script will generate a list of tapes by Name (Which is also the barcode on my system) that has expired and is Offline (Not in tape library) and email it to you, please feel free to edit this script as you see fit for your use.

Change the variables in the script to match your smtp server, from, reply and to email address.
Expired Media.ps1
Code: Select all
asnp VeeamPSSnapin

#SMTP server name
$smtpServer = "exchange.domain.local"

#Creating a Mail object
$msg = new-object Net.Mail.MailMessage

#Creating SMTP server object
$smtp = new-object Net.Mail.SmtpClient($smtpServer)

#Email structure
$msg.From = "backup@domain.local"
$msg.ReplyTo = "backup@domain.local"
$msg.To.Add("technicians@domain.local")
$msg.subject = "Backup Server - Expired Media Report"
$msg.body = Get-VBRTapeMedium | Where-Object { $_.IsOverwriteProtectionPeriodOver() -eq $True -and $_.LocationEx -like "Offline"} | Format-Table -Property Name | out-string

#Sending email
$smtp.Send($msg)
mcafeej
Influencer
 
Posts: 18
Liked: 3 times
Joined: Wed Nov 02, 2011 4:03 pm
Full Name: Jesse McAfee

Re: Expired Media Report

Veeam Logoby v.Eremin » Fri Mar 14, 2014 8:36 am

Hi, Jesse, as far as I know, the locationEX parameter indicates medium previous location, the place where the given tape has been stored previously. Thus, I suggest using $_.IsOnline parameter, instead, as it gives explicit information about cassette state.

Code: Select all
Where-Object {($_.IsOverwriteProtectionPeriodOver() -eq $True) -and ($_.IsOnline -eq $False)}


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 mcafeej » Fri Mar 14, 2014 12:36 pm

Thank you very much for the clarification, I have updated my code to match your recommendation.
mcafeej
Influencer
 
Posts: 18
Liked: 3 times
Joined: Wed Nov 02, 2011 4:03 pm
Full Name: Jesse McAfee

Re: Expired Media Report

Veeam Logoby v.Eremin » Fri Mar 14, 2014 1:41 pm

You can get all the parameters tape medium has via Get-Member commandlet; kind of useful thing when you don't know for sure what settings or parameters the given object has.

Anyway, glad to hear my input was useful. Let us know, if any other questions arise.

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 squirtleuk » Tue Jun 09, 2015 2:21 pm

I am interested in using this script, but I'm unable to get this to work. I'm new to Powershell, but I list some of the errors below from the command again listed below:

Code: Select all
Get-VBRTapeMedium | Where-Object {($_.IsOverwriteProtectionPeriodOver() -eq $True) -and ($_.IsOnline -eq $False)}

Method invocation failed because [Veeam.Backup.PowerShell.Infos.VBRTapeMedium] doesn't contain a method named 'IsOverwriteProtectionPeriodOver'.
At line:1 char:36
+ Get-VBRTapeMedium | Where-Object { $_.IsOverwriteProtectionPeriodOver() -eq $Tru ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound
 
Method invocation failed because [Veeam.Backup.PowerShell.Infos.VBRTapeMedium] doesn't contain a method named 'IsOverwriteProtectionPeriodOver'.
At line:1 char:36
+ Get-VBRTapeMedium | Where-Object { $_.IsOverwriteProtectionPeriodOver() -eq $Tru ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound


The errors continue for several pages. Any assistance would be appreciated.
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 » Wed Jun 10, 2015 10:28 am

In order to get expired media, use the following script:

Code: Select all
Get-VBRTapemedium | where {$_.IsExpired -eq $True}


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 squirtleuk » Wed Jun 10, 2015 10:51 am

Thank you that's great, can you filter the output to list just the tape names?
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 » Wed Jun 10, 2015 11:30 am

Sure,

Code: Select all
Get-VBRTapemedium | where {$_.IsExpired -eq $True} | 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 squirtleuk » Thu Jun 11, 2015 9:53 am

Again thanks. I also wish to filter tapes expired, but out of the library (i.e. with a Location of offline). I tried the following, but it shows no results:

Get-VBRTapemedium | where {($_.IsExpired -eq $True) -and ($_.IsOnline -eq $False)}
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 11:48 am

What about this one-liner?

Code: Select all
Get-VBRTapemedium | where {($_.IsExpired -eq $True) -and ($_.location.type -eq "Offline")} | select Name
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Next

Return to Tape



Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests