rubrikinc / rubrik-sdk-for-powershell

Rubrik Module for PowerShell
https://build.rubrik.com/sdks/powershell/
MIT License
102 stars 87 forks source link

Snapshots size #846

Closed amolsp777 closed 4 months ago

amolsp777 commented 9 months ago

Is your feature request related to a problem? Please describe.

Get-RubrikSnapshot should give snapshot size

Describe the solution you'd like

I want to fetch each snapshot size to calculate the differential backup size. Get-RubrikVM -Name "vmname" | Get-RubrikSnapshot

I tried all the possible syntaxes and functions but could not get the Snapshot size or consumption of that VM.

Describe alternatives you've considered

No response

Additional context

No response

amolsp777 commented 8 months ago

Any update on this ?

mwpreston commented 4 months ago

Hi @amolsp777 - We don't have a cmdlet to get snapshot sizes, and the snapshots returned within Get-RubrikVM do not return any storage stats. You can however do the following to get the information you are looking for...

$snapshotid = (Get-RubrikVM VMName | Get-RubrikSnapshot -Latest).id $snapshotinfo = (Invoke-RubrikRestCall -uri "https://cmd_ip/api/v1/snapshot/$snapshotid/storage/stats" -Method GET

$snapshotinfo

That should return some storage stats for you..