PowerShell script exchange
Post Reply
Andrew1981
Lurker
Posts: 1
Liked: never
Joined: Jun 02, 2023 2:51 pm
Full Name: Anderw martin
Contact:

Get backup repository storage sizes

Post by Andrew1981 »

Hi all, I'm trying to pull the used space information for a wasabi backup repository through Powershell, I've had a look online for a solution but I've had no success yet.

has anyone had any success getting this information via Powershell.
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Get backup repository storage sizes

Post by david.domask »

Hi @Andrew1981,

Right now there isn't a supported method for getting the Used Space information, and checking with unsupported ways, this information isn't returned conveniently. :/ I know there have been requests for the supported cmdlets to include this, so I will add your vote to that.

Used Space only tracks the data that Veeam itself offloaded, and it looks like in the configuration database, this information is pulled from a view, ReportRepositoriesView.

I cannot find a method (supported or otherwise) to call this from the shell, but I suppose you can use Invoke-SQLCMD to select from this View and filter on the repository ID returned by Get-VBRObjectStorageRepository. However, I ask your understanding that this method is not supported, and we cannot provide assistance via a Technical Support case, but you can try out Invoke-SQLCMD in your environment and we can try to guide here if you run into issues.
David Domask | Product Management: Principal Analyst
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get backup repository storage sizes

Post by oleg.feoktistov »

Hi,

If you are on v12, try this:

Code: Select all

$repo = Get-VBRObjectStorageRepository -Type Wasabi -Name 'wasabi.cloud'
[Veeam.Backup.Core.CArchiveRepository]::GetTotalUsedSize($repo.Id)
Unsupported, but could work as a workaround.

Best regards,
Oleg
gerwin
Service Provider
Posts: 9
Liked: never
Joined: Aug 04, 2011 5:49 pm
Full Name: Gerwin Goodschalk
Contact:

Re: Get backup repository storage sizes

Post by gerwin »

Thanks alot, this is what i needed.

Topic. Solved.
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests