I'm working with a big Veeam infrastructure and I want to get information on all the S3 buckets (standalone buckets and buckets that are capacity layers within scaleout repositories) within the infrastructure.
One of the main thing I'm looking for is the AWS region where those buckets are located, the bucket name, folder name and their size.
Standalone S3 Repositories
I can find Region, bucket and folder using Get-VBRObjectStorageRepository, but I didn't find where I can find the size used in the bucket.
Sample code here:
Code: Select all
$repositories = Get-VBRBackupRepository
foreach ($repo in $repositories) {
if ($repo.TypeDisplay -eq "Amazon S3") {
$ObjectStorageRepoProperties = Get-VBRObjectStorageRepository -id $repo.ID
$Repoinfo = $repo.Info
$AmazonOptions = $repo.AmazonOptions
Write-Host "AWS Region: $($AmazonOptions.RegionId)"
Write-Host "AWS Bucket Name: $($AmazonOptions.BucketName)"
Write-Host "Bucket folder name: $($AmazonOptions.FolderName)"
}
}
How I can get the used size?
Scale Out Repositories
In this case, I can't even find the previous data available for standalone S3 buckets. I show the sample code below I'm using below:
Code: Select all
$scaleOutRepos = Get-VBRBackupRepository -ScaleOut
foreach ($scaleOutRepo in $scaleOutRepos) {
$CapacityLayer = Get-VBRrepositoryExtent -repository $scaleoutrepo.Name
$capacityBucket = Get-VBRObjectStorageRepository -Id $CapacityLayer.Id
}
}
PS C:> Get-VBRObjectStorageRepository -name lab-s3bucket
AmazonS3Folder : Lab-Backup
EnableIAStorageClass : False
EnableOZIAStorageClass : False
BackupImmutabilityEnabled : True
ImmutabilityPeriod : 14
MountServerOptions : Veeam.Backup.PowerShell.Infos.VBRRepositoryMountServerOptions
Type : AmazonS3
GatewayServer : {gateway.mydomain.com(5b291ada-e588-411d-9af6-a84eef50c685)}
ConnectionType : Gateway
SizeLimitEnabled : False
SizeLimit : 10240
ConcurrentTasksLimitEnabled : False
MaxConcurrentTasksCount : -1
Id : 3730886c-b114-4c19-ac0c-1b8955420920
Name : Lab-S3Bucket
Description : S3 Bucket used for LAB and Testing
What I'm doing wrong? how I can get the region info for the S3 bucket attached as capacity extent in the scaleout repository? And how I can get the size as well?
If anyone can help it will be highly appreciated.
Thanks in advance and best regards!