PowerShell script exchange
Post Reply
tocals
Lurker
Posts: 1
Liked: never
Joined: Nov 08, 2023 8:27 pm
Full Name: Carlos Alberto Lima dos Santos
Contact:

Get size of file to tape backups

Post by tocals »

Hello All

I Found the script bellow to get size of vmbackups at powershell-f26/get-size-of-all-tape-backups-t66818.html

I'm trying to change the script to get size of file to tape backups, but when I change the job type, but the result is null.

Does anyone have any suggestions how to return the size of these file to tape jobs?

# I change this line
#$jobType = [Veeam.Backup.Model.EDbJobType]::VmTapeBackup
# to this line
$jobType = [Veeam.Backup.Model.EDbJobType]::FileTapeBackup
$backups = [Veeam.Backup.Core.CBackup]::FindByJobType($true, $JobType)
foreach ($backup in $backups) {
[int]$totalSize = ""
$storages = $backup.GetAllStorages()
foreach ($storage in $storages) {
$backupSize = $storage.Stats.BackupSize/1GB
$backupSize = [Convert]::ToInt32($backupSize)
$totalSize += $backupSize
}
$restorepoints = Get-VBRRestorePoint -Backup $backup
$backup | select-object Name, @{n='RPCount';e={$restorepoints.Count}}, @{n='BackupSizeTotal, GB';e={$totalSize}}
}
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get size of file to tape backups

Post by oleg.feoktistov »

Hi Carlos,

File backups have distinct structure, so for them we can't really get backup storages like for machine backups.
So, try this method instead.

Best regards,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests