Hi,
Sorry that this is an old thread and that GET-VBRTAPEBACKUP cmdlet is even more "obsolete and no loner supported"
However, your scripts seem to be exactly what I was looking for.
Environment.
Veeam 8.0.0.2084
4 x Hyper-v 2008 R2 Sp1
About 20Tbs of data across about 30 VMs
8 disk backup jobs every night.
2 tape dupe jobs to put these on tape each week.
About 20 tapes used each week across these 2 tape jobs.
Backing up to a HP MSL8096 Loader/Tape drive (2 drives, 96 slots)
Requirement.
To provide the customer with a list of tapes and their corresponding tapes to remove each week.
Current process
Open Tape job reports
Copy "Used tapes" into excel.
Then using replace to remove duplicate tape entries (Tape names are listed twice for each tape)
Using the comma as a delimiter to put the tapes into separate columns.
Paste special and use transpose to place all tapes into a single column.
Repeat for 2nd tape job.
Been looking at Vaults, Veeam One etc do not seem to provide what I need. (Take these tapes out and send them offsite)
Veeam One breaks it down by disk jobs within the Tape job. Even if it did, hard to sell them a product, just so they can be told what tapes they can take out like it did Commvault apparently.
As you will probably work out, I know very little about powershell.
Ran the above scripts by.
1. Open Veeam Backup & Replication Console.
2. From Veeam Menu, selected "Powershell"
3. Tried just pasting scripts and running, with a few carriage returns.
4. Tried creating a PS1 file and running that as well. E.g. .\tapeout.ps1
Tried with original script, but changing "test" to name of my tape job "VeeamBackups1 Tape Dupe"
Code: Select all
asnp "VeeamPSSnapIn"
$job=get-vbrtapejob -name "VeeamBackups1 Tape Dupe"
$session= Get-VBRSession -Job $job -Last
$session
[xml]$xml=$session.AuxData
$session1=$xml.TapeAuxData.TapeMediums.TapeMedium.name
$session1
$session2 =Get-VBRTapeMedium -name $session1 | Select-Object -Property @{N="Barcode";E={$_.Barcode}}, @{N="Location";E={$_.Locationex}}, @{N="Free capacitye";E={$_.Free}} | fl | out-string;
$session2
I get the error
Code: Select all
Get-VBRTapeMedium : Cannot validate argument on parameter 'Name'. The argument is null or empty. Provide an argument
that is not null or empty, and then try the command again.
At C:\temp\tapeout.ps1:8 char:40
+ $session2 =Get-VBRTapeMedium -name $session1 | Select-Object -Property @{N= ...
+ ~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-VBRTapeMedium], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Cmdlets.GetVBRTapeMedium
When I run
Code: Select all
$TapeBackups = Get-VBRTapeBackup | where {$_.getJob().Name -eq $jobName}
$vms = $TapeBackups.GetLastOibs() | select name, CreationTime | Format-Table -AutoSize | Out-String
I get the error
Code: Select all
You cannot call a method on a null-valued expression.
At line:1 char:1
+ $vms = $TapeBackups.GetLastOibs() | select name, CreationTime | Format-Table -Au ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
As this is not supported any more and no other replacement can be found, I'm not sure if I should place a support call.
But let me know and I will
I also looked at v.Eremin script, but was unsure how to combine the original script and his addition.
So, if anyone could please supply me with a method, so that a single script can be run (from the desktop if possible) that just give me a list of tapes that the customer needs to take out.