Hi all,
is there a possibility (Powershell, SQL, etc.) to find out the number of written backups and the size of the written backups as a total sum?
We need to provide a monthly overview of this for the management.
Many thanks for your help
-
- Enthusiast
- Posts: 39
- Liked: 6 times
- Joined: Jun 26, 2020 9:47 pm
- Full Name: Walter Neu
- Contact:
-
- Veeam Software
- Posts: 2010
- Liked: 669 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Number of backups and total sum
Hi Walter,
Sure, try this one:
Please mind though that Get-VBRBackup doesn't show some types. For instance, snapshots or backup copies of backups made with Veeam for AWS/Azure/Google. If you want to retrieve those, you might need to use this .NET method instead:
If you have any VCB instances connected to your VBR console, make sure to exclude cloud backups made by those instances as they are not taking up any space in your VBR environment and has no size information to offer from VBR side. Example:
Thanks,
Oleg
Sure, try this one:
Code: Select all
$backups = Get-VBRBackup | where {$_.VMCount -ne 0}
$sizeTotal = $null
foreach ($backup in $backups) {
$storages = $backup.GetAllStorages()
foreach ($storage in $storages) {
$sizeTotal += $storage.Stats.BackupSize
}
}
$sizeRounded = [Math]::Round($sizeTotal / 1GB, 1)
$sizeTotal | select @{n='BackupsCount';e={$backups.Count}}, @{n='TotalSizeGB';e={$sizeRounded}}
Code: Select all
$backups = [Veeam.Backup.Core.CBackup]::GetAll()
Code: Select all
$backups = [Veeam.Backup.Core.CBackup]::GetAll() | where {$_.TypeToString -ne 'AWS EC2'}
Oleg
Who is online
Users browsing this forum: No registered users and 10 guests