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 » Sep 26, 2012 2:22 pm

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
SVP, Product Management
Posts: 24789
Liked: 3523 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 » Sep 26, 2012 4:51 pm

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 » Sep 27, 2012 8:22 pm

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
SVP, Product Management
Posts: 24789
Liked: 3523 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 » Sep 27, 2012 8:45 pm

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 » Sep 27, 2012 8:50 pm

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
SVP, Product Management
Posts: 24789
Liked: 3523 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 » Sep 27, 2012 9:18 pm

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 » Oct 01, 2012 2:18 pm 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
SVP, Product Management
Posts: 24789
Liked: 3523 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 » Oct 01, 2012 10:13 pm

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: No registered users and 24 guests