Comprehensive data protection for all workloads
Post Reply
clintljohnson
Novice
Posts: 7
Liked: 1 time
Joined: Sep 26, 2012 2:19 pm
Full Name: Clint L johnson
Contact:

SQL Query for Last Backup Datetime by VM Name

Post by clintljohnson »

Can anyone cite a previous discussion or paste an example to backend the Veeam Database to pull the last backup time by VM Name or VM Hostname ?

Thanks,
Clint.
Gostev
Chief Product Officer
Posts: 31459
Liked: 6648 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: SQL Query for Last Backup Datetime by VM Name

Post by Gostev »

Hi Clint,

Instead of messing with database, have you thought of using our feature that stamps this information into VM Notes attribute, so that you could easily see it in vSphere Client? You should also be able to pull this data into report through PowerCLI easily.

Or you can just wait a little, since the upcoming Veeam ONE release adds B&R reporting capabilities, and one of the reports (Protected VMs) provides this exact information.

Thanks!
clintljohnson
Novice
Posts: 7
Liked: 1 time
Joined: Sep 26, 2012 2:19 pm
Full Name: Clint L johnson
Contact:

Re: SQL Query for Last Backup Datetime by VM Name

Post by clintljohnson »

Can you give me the PowerCLI command? Some of our guys are already using the Notes field for other purposes.

Thanks Gostev for always watching these forums..!

Clint.
Gostev
Chief Product Officer
Posts: 31459
Liked: 6648 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: SQL Query for Last Backup Datetime by VM Name

Post by Gostev »

Actually, it does not have to be Notes field. You can choose any attribute (Notes is just the default, pre-populated one).
Here is the reference of all VMware PowerCLI commands > http://www.vmware.com/support/developer ... index.html
clintljohnson
Novice
Posts: 7
Liked: 1 time
Joined: Sep 26, 2012 2:19 pm
Full Name: Clint L johnson
Contact:

Re: SQL Query for Last Backup Datetime by VM Name

Post by clintljohnson »

Gostev,
How do I wire that up? So that a field will have the last backup time ? I used to use Acronis (don't scream) and it wrote to a Last Backup field. Not sure if Virtual Center has that field or if it was added by something I installed.

C.
Gostev
Chief Product Officer
Posts: 31459
Liked: 6648 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: SQL Query for Last Backup Datetime by VM Name

Post by Gostev »

I recommend you just enable this functionality to see the string produced. It contains both the last successful backup time, and some other useful info as well (such as where the backup is located). If you only want the backup time, you are going to need to parse this string.
clintljohnson
Novice
Posts: 7
Liked: 1 time
Joined: Sep 26, 2012 2:19 pm
Full Name: Clint L johnson
Contact:

Re: SQL Query for Last Backup Datetime by VM Name

Post by clintljohnson » 1 person likes this post

Gostev,
I was able to create a new attribute in vSphere called "Veeam" and modified all of my jobs to populate that custom attribute field. Now I'm able to easily retrieve the information I was looking for, last backup time.

Thanks for your assistance!.

Clint.
Gostev
Chief Product Officer
Posts: 31459
Liked: 6648 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: SQL Query for Last Backup Datetime by VM Name

Post by Gostev »

No problems! Glad to hear you have achieved exactly what you wanted without having to mess up with direct SQL access, because database schema tends to change from version to version. What you are using today is really a much better solution for the long term!
Post Reply

Who is online

Users browsing this forum: B.F., rweis and 242 guests