Quantcast
Channel: R&D Forums
Viewing all articles
Browse latest Browse all 10082

Reporting • Re: Billing Report for File Backup

$
0
0
Hi,

we are gettings this data

JobFileShareSize

PS is using;
Get-VBRUnstructuredBackup
Get-VBRUnstructuredBackupRestorePoint

I can't take credit for it, I found it online and did some modifications to add a total for customers with multiple shares in the same job

$backups = Get-VBRUnstructuredBackup
$data = @()

foreach ($backup in $backups){
$b = Get-VBRUnstructuredBackup -Name $backup.Name
$points = Get-VBRUnstructuredBackupRestorePoint -Backup $b
$sharebackup = @{}
$total = 0
foreach ($point in $points) {
if (!($sharebackup.ContainsKey($point.ServerName))) {
$sharebackup.Add($point.ServerName, $point)
}
}
foreach ($share in $sharebackup.Keys) {
$backupinfo = [Veeam.Backup.Core.CNasBackup]::GetByNasPointId($sharebackup[$share].Id)
$shortterm = $backupinfo.GetNasBackupShortTerm()
$fullsize = [Math]::Round(($shortterm.Info.DataSize + $shortterm.Info.MetaSize)/1GB, 2)
$total += $fullsize
$data += @(
[pscustomobject]@{Job=$b.name;FileShare=$share;Size=$fullsize;}
)
}
$data += @(
[pscustomobject]@{Job=$b.name;FileShare='Total:';Size=$total;}
)
}

Statistics: Posted by mikaeln — May 13, 2026 6:41 am



Viewing all articles
Browse latest Browse all 10082

Latest Images

Trending Articles



Latest Images