How to get backup status? RRS feed

  • Question

  • As an exercise to come up to speed on C# I thought I would try to write something that I might actually find useful, and so I decided to try to write an add-in that would display the backup status of all the clients (basically, when the last backup was and whether it suceeded or failed).


    However, in the SDK I only found two methods related to backups - GetBackupStartTime() and GetBackupEstimatedCompletionTime().


    Does this mean there is no way to do what I am trying to do?


    I know I can right-click each client and choose View Backups, but I really wanted something I only needed to glance at.


    Thanks ... Mike

    Thursday, December 20, 2007 8:14 PM

All replies

  • Mike, I'm sure the information you're looking for is available, because the Console is able to display it. However, it's not part of the SDK. That's probably because the backup engine is considered an internal component of Windows Home Server, with which no third-party add-in is expected to communicate.

    All of the assemblies that will make that information available to you are on your server; figuring out which interfaces you need is kind of up to you. Smile
    Thursday, December 20, 2007 8:49 PM

  • What Ken said.

    You can use .NET Reflector to look at the various DLLs in the "Program Files\Windows Home Server" folder on your WHS and see how the information in "View Backups" is gathered. Then just add a reference to the appropriate DLL in your app and you should be able to use the same calls.

    Thursday, December 20, 2007 9:30 PM
  • Thanks Ken and Andrew. I maybe should have been more specific in that I was hoping to do this via a documented supported API, rather than having to reverse-engineer it. I think the latter is beyond my abilities at this point.




    Edit: PS - I put in a request for something like this via Connect. It was closed recently, with no explanation so I don't know if it was "won'tfix" or "yeah, great idea, we'll get right on it".

    Thursday, December 20, 2007 11:30 PM