I have recently started with using Veaam7 for both VM backups (upgrade from 6.5) and also for tape offload.
I did have a usability issue with the tape offload part. We make a daily VM backup to a san, and then offload this backup to tape. The tapes are inside a library, and we have a third party company taking these tapes offsite on a daily basis.
Before we used HP dataprotector which allowed us to send the third party an email with the relevant tapes and location (slots) in the library, so that they can effectively bring the tapes offsite.
In Veaam, there doesn't seem to be a way to set notification options specific to tape jobs (allthough I did see the option using powershell), which means the only apparent way is using the global notification option. This is not workable for us, as the third party company is of course only interested in the tape job, not the other jobs we might and do run.
Furthermore, the standard job notification only displays tape name+barcode not location of the tape in the library.
Since I do use and like powershell, I went ahead and tried to find a way of doing it via powershell, and in fact I found a way. Now I don't know if this is the most direct way, but this is (for now) the most direct way I could find. I will share this here, in case others might find it usefull.
Also I would be interested if there is a more direct way. Simply put, I need the tapes used for a specific sesison for a specific job.
This is how I have handled it (I used parts of code already published on this forum, mainly the way to invoke the script).
I have added a task in the Windows task scheduler that runs on an event trigger: Log: Veeam Backup, Source Veeam Backup, event ID 0. The action is to run the following powershell script:
Code: Select all
$x = (get-eventlog "Veeam Backup" | where {$_.timegenerated -gt $(get-date).addminutes(-10)}).Message #search evenlog for last 10 minues
if ($x -eq "Session Daily Tapeoffload has been completed.") #search for text in eventlog, the Daily Tapeoffload is the actual name of the veeam job
{
asnp "VeeamPSSnapIn"
$job=get-vbrtapejob -name "Daily Tapeoffload"
$session=$job.findlastsession()
[xml]$xml=$session.AuxData
$session1=$xml.TapeAuxData.TapeMediums.TapeMedium.name
$session2 =Get-VBRTapeMedium -name $session1 | Select-Object -Property @{N="Barcode";E={$_.Barcode}}, @{N="Location";E={$_.Locationex}} | fl | out-string;
Send-MailMessage -To recipient@something.com -From sender@something.com -Subject "Daily TapeOffload" -bodyashtml -encoding ASCII -body "<font face=Arial>Daily TapeOffload has succeeded.<br><br> $session2</b></font>" -smtpserver smtp.somedomain.com
}
Now the only other way ( I could find) to get the tape names is using $session.getdetails() but this simply gets you names of tape (+ barcodes) and any other warning messages, which meant I needed to do string manipulation. In the case of using auxdata and reading the xml into powershell this isn't needed and flexible for whichever number of tapes that might be used.