-
- Service Provider
- Posts: 56
- Liked: 2 times
- Joined: Dec 10, 2021 6:35 pm
- Full Name: Koushik Polsana
- Contact:
Fetching SOBR details in TB or GB through powershell
Hello,
I followed few old forums to get the SOBR space used and free space but all the results I got were coming in bits or bytes and with V11 I was unable to get any, I really appreciate if someone can guide me to get that info using PowerShell commands or scripts.
I followed few old forums to get the SOBR space used and free space but all the results I got were coming in bits or bytes and with V11 I was unable to get any, I really appreciate if someone can guide me to get that info using PowerShell commands or scripts.
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
Hi Koushik,
In v11 we introduced some underlying achitectural changes for repositories, so some of the properties were moved, including space-related ones. You can find detailed explanation and ways to get them here. With SOBR space reporting I would do something like this:
Keep in mind that I didn't use InGigabytes property in this case and wouldn't recommend it because an unobvious rounding factor takes place there. So, you might be off by few gigabytes in your final report. With InMegabytes values properly divided and rounded data in the final report corresponded to the space report in the UI in my case.
Best regards,
Oleg
In v11 we introduced some underlying achitectural changes for repositories, so some of the properties were moved, including space-related ones. You can find detailed explanation and ways to get them here. With SOBR space reporting I would do something like this:
Code: Select all
$sobrs = Get-VBRBackupRepository -Scaleout
$sobrReport = @()
foreach ($sobr in $sobrs) {
$extents = $sobr.Extent
$totalSpace = $null
$totalFreeSpace = $null
foreach ($extent in $extents) {
$repo = $extent.Repository
$container = $repo.GetContainer()
$totalSpace += [Math]::Round($container.CachedTotalSpace.InMegabytes / 1024, 1)
$totalFreeSpace += [Math]::Round($container.CachedFreeSpace.InMegabytes / 1024, 1)
}
$sobrReport += $sobr | select Name, @{n='TotalSpace';e={$totalSpace}}, `
@{n='FreeSpace';e={$totalFreeSpace}}
}
$sobrReport
Best regards,
Oleg
-
- Service Provider
- Posts: 56
- Liked: 2 times
- Joined: Dec 10, 2021 6:35 pm
- Full Name: Koushik Polsana
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
Thanks a lot for sharing the script or the information, however when I run below code I do not see any output, do I have to add any output lines into the code to show me the output. Currently it does not give me error nor any output, please advise.
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
Yep, all the results are in $sobrReport variable. I appended it to the end of the initial script so that the value is displayed. Thanks!
-
- Service Provider
- Posts: 56
- Liked: 2 times
- Joined: Dec 10, 2021 6:35 pm
- Full Name: Koushik Polsana
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
Thanks a lot Oleg I was able to get those details in TB after making few modifications, appreicate the help. How can I get the same data for cloud repositories info ?
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
What do you mean by cloud repositories? Object storages hosted in the cloud or cloud repositories used in Cloud Connect functionality?
-
- Service Provider
- Posts: 56
- Liked: 2 times
- Joined: Dec 10, 2021 6:35 pm
- Full Name: Koushik Polsana
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
The Cloud Repository of Service Provider using Veeam Cloud Connect.
-
- Service Provider
- Posts: 56
- Liked: 2 times
- Joined: Dec 10, 2021 6:35 pm
- Full Name: Koushik Polsana
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
Hi Oleg,
Could you please let us know how can we pull the same information for Cloud repositories used in cloud connect functionality ?
Could you please let us know how can we pull the same information for Cloud repositories used in cloud connect functionality ?
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
Hi,
If you need to obtain it from tenant's side, the approach is the one I shared above.
If from provider's side, here is an example:
Thanks,
Oleg
If you need to obtain it from tenant's side, the approach is the one I shared above.
If from provider's side, here is an example:
Code: Select all
$tenants = Get-VBRCloudTenant
foreach ($tenant in $tenants) {
$resources = $tenant.Resources
foreach ($resource in $resources) {
$resource | select RepositoryFriendlyName, RepositoryQuota, UsedSpace
}
}
Oleg
-
- Service Provider
- Posts: 56
- Liked: 2 times
- Joined: Dec 10, 2021 6:35 pm
- Full Name: Koushik Polsana
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
If I have to do it from the tenant side, do I have to change Scaleout in Get-VBRBackupRepository -Scaleout to cloud repository or any other thing ?
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
Just use Get-VBRBackupRepository without -Scaleout parameter. Cloud repositories should be available in the output. Thanks!
-
- Service Provider
- Posts: 56
- Liked: 2 times
- Joined: Dec 10, 2021 6:35 pm
- Full Name: Koushik Polsana
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
I tried the same script without the -scaleout parameter and the output came in as empty but it listed out the repositories, please advise.
The output we get is as below
Name TotalSpace FreeSpace
---- ---------- ---------
Default Backup Repository
VCC_REPO001
Configuration Backups VCC
The output we get is as below
Name TotalSpace FreeSpace
---- ---------- ---------
Default Backup Repository
VCC_REPO001
Configuration Backups VCC
-
- Service Provider
- Posts: 56
- Liked: 2 times
- Joined: Dec 10, 2021 6:35 pm
- Full Name: Koushik Polsana
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
$tenants = Get-VBRCloudTenant
foreach ($tenant in $tenants) {
$resources = $tenant.Resources
foreach ($resource in $resources) {
$resource | select RepositoryFriendlyName, RepositoryQuota, UsedSpace
}
}
for this script how can I get the result in TB or GB the same way as the scaleout repo's thanks a lot appreciate the help
foreach ($tenant in $tenants) {
$resources = $tenant.Resources
foreach ($resource in $resources) {
$resource | select RepositoryFriendlyName, RepositoryQuota, UsedSpace
}
}
for this script how can I get the result in TB or GB the same way as the scaleout repo's thanks a lot appreciate the help
-
- Service Provider
- Posts: 56
- Liked: 2 times
- Joined: Dec 10, 2021 6:35 pm
- Full Name: Koushik Polsana
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
Hello Oleg, Checking in to see if you have an update on the request. Thanks
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
Hi,
About the very same script for SOBR repositories. You also need to get rid of SOBR extents queries and obtain repository containers directly. Like that:
About cloud tenant's side script. Looks like the sizes there are reflected in megabytes only. So you'd need to divide them to get TB and GB.
Thanks,
Oleg
About the very same script for SOBR repositories. You also need to get rid of SOBR extents queries and obtain repository containers directly. Like that:
Code: Select all
$repos = Get-VBRBackupRepository
$repoReport = @()
foreach ($repo in $repos) {
$container = $repo.GetContainer()
$totalSpace += [Math]::Round($container.CachedTotalSpace.InMegabytes / 1024, 1)
$totalFreeSpace += [Math]::Round($container.CachedFreeSpace.InMegabytes / 1024, 1)
$repoReport += $repo | select Name, @{n='TotalSpace';e={$totalSpace}}, `
@{n='FreeSpace';e={$totalFreeSpace}}
}
$repoReport
Thanks,
Oleg
-
- Service Provider
- Posts: 56
- Liked: 2 times
- Joined: Dec 10, 2021 6:35 pm
- Full Name: Koushik Polsana
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
If I have Object storage as primary SOBR not an offloading one how can I get size of it, when I ran the below commands it gave me 0
$sobrs = Get-VBRBackupRepository -Scaleout
$sobrReport = @()
foreach ($sobr in $sobrs) {
$extents = $sobr.Extent
$totalSpace = $null
$totalFreeSpace = $null
foreach ($extent in $extents) {
$repo = $extent.Repository
$container = $repo.GetContainer()
$totalSpace += [Math]::Round($container.CachedTotalSpace.InMegabytes / 1024, 1)
$totalFreeSpace += [Math]::Round($container.CachedFreeSpace.InMegabytes / 1024, 1)
}
$sobrReport += $sobr | select Name, @{n='TotalSpace';e={$totalSpace}}, `
@{n='FreeSpace';e={$totalFreeSpace}}
}
$sobrReport
{
"Name": "SOBR001",
"TotalSpace": 1023.9,
"FreeSpace": 954.9
},
{
"Name": "WAS-SOBR001",
"TotalSpace": 0,
"FreeSpace": 0
}
$sobrs = Get-VBRBackupRepository -Scaleout
$sobrReport = @()
foreach ($sobr in $sobrs) {
$extents = $sobr.Extent
$totalSpace = $null
$totalFreeSpace = $null
foreach ($extent in $extents) {
$repo = $extent.Repository
$container = $repo.GetContainer()
$totalSpace += [Math]::Round($container.CachedTotalSpace.InMegabytes / 1024, 1)
$totalFreeSpace += [Math]::Round($container.CachedFreeSpace.InMegabytes / 1024, 1)
}
$sobrReport += $sobr | select Name, @{n='TotalSpace';e={$totalSpace}}, `
@{n='FreeSpace';e={$totalFreeSpace}}
}
$sobrReport
{
"Name": "SOBR001",
"TotalSpace": 1023.9,
"FreeSpace": 954.9
},
{
"Name": "WAS-SOBR001",
"TotalSpace": 0,
"FreeSpace": 0
}
-
- Service Provider
- Posts: 56
- Liked: 2 times
- Joined: Dec 10, 2021 6:35 pm
- Full Name: Koushik Polsana
- Contact:
Re: Fetching SOBR details in TB or GB through powershell
How can I use the following code to get the repositories info as well
$sobrs = Get-VBRBackupRepository -Scaleout
$sobrReport = @()
foreach ($sobr in $sobrs) {
$extents = $sobr.Extent
$totalSpace = $null
$totalFreeSpace = $null
foreach ($extent in $extents) {
$repo = $extent.Repository
$container = $repo.GetContainer()
$totalSpace += [Math]::Round($container.CachedTotalSpace.InMegabytes / 1024, 1)
$totalFreeSpace += [Math]::Round($container.CachedFreeSpace.InMegabytes / 1024, 1)
}
$sobrReport += $sobr | select Name, @{n='TotalSpace';e={$totalSpace}}, `
@{n='FreeSpace';e={$totalFreeSpace}}
}
$sobrReport
I tried the following code but it does not give the info other than the default backup
$repos = Get-VBRBackupRepository
$repoReport = @()
foreach ($repo in $repos) {
$container = $repo.GetContainer()
$totalSpace += [Math]::Round($container.CachedTotalSpace.InMegabytes / 1024, 1)
$totalFreeSpace += [Math]::Round($container.CachedFreeSpace.InMegabytes / 1024, 1)
$repoReport += $repo | select Name, @{n='TotalSpace';e={$totalSpace}}, `
@{n='FreeSpace';e={$totalFreeSpace}}
}
$repoReport
$sobrs = Get-VBRBackupRepository -Scaleout
$sobrReport = @()
foreach ($sobr in $sobrs) {
$extents = $sobr.Extent
$totalSpace = $null
$totalFreeSpace = $null
foreach ($extent in $extents) {
$repo = $extent.Repository
$container = $repo.GetContainer()
$totalSpace += [Math]::Round($container.CachedTotalSpace.InMegabytes / 1024, 1)
$totalFreeSpace += [Math]::Round($container.CachedFreeSpace.InMegabytes / 1024, 1)
}
$sobrReport += $sobr | select Name, @{n='TotalSpace';e={$totalSpace}}, `
@{n='FreeSpace';e={$totalFreeSpace}}
}
$sobrReport
I tried the following code but it does not give the info other than the default backup
$repos = Get-VBRBackupRepository
$repoReport = @()
foreach ($repo in $repos) {
$container = $repo.GetContainer()
$totalSpace += [Math]::Round($container.CachedTotalSpace.InMegabytes / 1024, 1)
$totalFreeSpace += [Math]::Round($container.CachedFreeSpace.InMegabytes / 1024, 1)
$repoReport += $repo | select Name, @{n='TotalSpace';e={$totalSpace}}, `
@{n='FreeSpace';e={$totalFreeSpace}}
}
$repoReport
Who is online
Users browsing this forum: Semrush [Bot] and 8 guests