I'm looking to automate billing reports using the API to grab backup utilization from the Enterprise Manager server. I'd like to use the API to avoid having problems with manual processes when a new customer is added or a backup server is added/decommed.
Our setup involves separate jobs tied to the customer across several backup servers. My aim has been:
- Enumerate the backup servers using
Code: Select all
/api/query?type=BackupServer
- Pull out the repositories using
Code: Select all
/api/backupServers/{id}/repositories
- Get the BackupReferenceList for each repository using
Code: Select all
/api/repositories/{id}/backups
- List out the BackupFiles for the list using
Code: Select all
/api/backups/{id}/backupFiles?format=Entity
The problem is that it's not quite the same; it's close, but I have to assume some rounding is happening as the API results from adding the DataSize fields together is just a bit more than what the web UI reports for "Total Size". Or perhaps I'm not using the correct values?
Another question comes in with compression - if I multiply the DataSize by the CompressRatio percentage [DataSize(1/CompressRatio)], I'm still a little bit off/under from what the "Total Size" is reporting on the web UI. Is this how compression is calculated by the Enterprise Manager server (or the individual backup server if that's where the data is coming from)?
In conclusion:
- What do the BackupSize and DataSize numbers actually represent?
- How do I calculate in the CompressRatio (and DeduplicationRatio if necessary) to get the Total Size of the selected job?
- Is there an easier way to get the Total Size of a selected job using the API?