When I sum BackupSize retrieved from GetAllStorages of all backups, the total amount looks higher than the number being viewed through SOBR Used Space.
What's the difference in between those two approaches?
First just a note mostly for the other readers that the .NET Methods are not supported and may have some nuances that might preclude a full answer here, but I'll do my best.
How are you building the $backup object just for my reference?
Similarly, can you use GetAllChildrenStorages() instead of GetAllStorages()? The latter is an older method and I'm not sure where (if at all) it's used, but for long time I've been using GetAllChildrenStorages() as it seems to be what we call usually nowadays.
I did notice some incongruencies in my lab, but I also purposefully break things in my lab so I suspect I have some entries in the db that aren't showing in the UI (probably my fault from old db edit testing, not expected in actual environments)
If you can explain how you build $backups and confirm that switching to GetAllChildrenStorages() doesn't meet your needs (Still use this one IMO), then post again and will think on it.
David Domask | Product Management: Principal Analyst
Hi David,
Thanks for your reply!
I tried using GetAllChildrenStorages() and tested in 3 environments. It looks like the GetAllChildrenStorages() will return double. I guess it's because we had upgraded backup chain format.
In 1st environment:
- OrgA
-- VBR Console used space: 13.2 TB
-- PS GetAll total backupsize: 12.89 TB
-- PS GetAll # of storage: 4055
-- PS GetChildrenAll total backupsize: 23.63 TB
-- PS GetChildrenAll # of storage: 7332
- OrgB
-- VBR Console used space: 13.1 GB
-- PS GetAll total backupsize: 13.13 GB
-- PS GetAll # of storage: 2
-- PS GetChildrenAll total backupsize: 26.25 GB
-- PS GetChildrenAll # of storage: 4
In 2nd environment:
- OrgC
-- VBR Console used space: 11.57 TB
-- PS GetAll total backupsize: 11.57 TB
-- PS GetAll # of storage: 3084
-- PS GetChildrenAll total backupsize: 22.85 TB
-- PS GetChildrenAll # of storage: 6092
- OrgD
-- VBR Console used space: 9.5 GB
-- PS GetAll total backupsize: 9.5 GB
-- PS GetAll # of storage: 2
-- PS GetChildrenAll total backupsize: 19.0 GB
-- PS GetChildrenAll # of storage: 4
The 3rd environment is very big. Now my code is still running. It output all storage in details for both GetAllStorages and GetAllChildrenStorages. As for now, the # of storage by GetAllStorages is 400k, while the # of storage by GetAllChildrenStorages is 483k.
They are different.
Thanks for that - you mention Orgs, is it correct you're using this on vCD backups? I suspect you may be correct and multiple objects are being returned from vApps or something, but I would check the first 10 outputs of one of the arrays you return and just see what's under there; my guess is that indeed it will return some duplicate data perhaps, but it's been awhile since I worked with vCD. If you can confirm it and share your script, I can try to take a look and see why we might have excess results.
David Domask | Product Management: Principal Analyst
Hi David,
Yes, we're using vCD backup.
Here is the PS Code. $logFile is output of all storages retrieved by $backup.GetAllStorages(). $logFileCS is output of all storages retrieved by $backup.GetAllChildrenStorages().