PowerShell script exchange
Post Reply
gerwin
Service Provider
Posts: 9
Liked: never
Joined: Aug 04, 2011 5:49 pm
Full Name: Gerwin Goodschalk
Contact:

Used space of a Azure External Repository

Post by gerwin »

We are looking for the powershell command to get the Used Space on the external repositories.
Backup Infrastructure > External Repositories > Used Space column.
For example we use the below value for our wasabi repo's.

[Veeam.Backup.Core.CArchiveRepository]::GetTotalUsedSize($repo.Id)
But this ain't working for the Azure backup > Microsoft Azure Blob Storage repo's.
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Used space of a Azure External Repository

Post by david.domask »

Hi @gerwin, maybe I'm missing it but I'm not sure there's a supported method for retrieving this right now.

You can use the following unsupported method to retrieve information on the external repositories. Please note that as the method is unsupported, the syntax and functionality of this method may change on any given update. Hopefully we can get some more reporting on this, as looks like the REST API only supports directly attached and network (e.g., SMB/NFS) repositories: https://helpcenter.veeam.com/archive/ba ... positories

[Veeam.Backup.ExternalRepository.CExternalRepository]::GetAll()

There is a method GetContainer() which I believe gives you what you want, and the resulting object has an Info property.

Does that work for you with the unsupported method?
David Domask | Product Management: Principal Analyst
gerwin
Service Provider
Posts: 9
Liked: never
Joined: Aug 04, 2011 5:49 pm
Full Name: Gerwin Goodschalk
Contact:

Re: Used space of a Azure External Repository

Post by gerwin »

Thanks, found more info and options about the repo. But not the amount of used space.
If anyone find a way to get the used space in powershell let me know.
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Used space of a Azure External Repository

Post by david.domask »

Hi Gerwin,

Try:
Get-VBRLicenseAutoUpdateStatus | Out-Null #this is required to "hot load" the DLLs
$repo = [Veeam.Backup.ExternalRepository.CExternalRepository]::GetAll()
$repo.GetContainer().Info

Id : 698f7ea6-0f6b-4675-a790-fc3262bd8799
Type : Default
TotalSpace : 780 MB (817931692)
FreeSpace : 0 B (0)
UniqueKey : 698F7EA6-0F6B-4675-A790-FC3262BD8799
ApiUrl :

That's what I had here. FreeSpace will always be 0 because S3/Blob buckets are "infinite". I'm testing on v12 CP3 btw, so if you're not on the same it might have changed.
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests