PowerShell script exchange
Post Reply
odruard
Enthusiast
Posts: 40
Liked: 5 times
Joined: Jan 25, 2011 2:12 pm
Full Name: Olivier Druard
Contact:

Replications statistics

Post by odruard »

Hello

For one of our clients, we use Veeam Backup and Replication v6.5 for DRP purpose.
About 250 VMs are replicated throuth 35 jobs.

I'd like to extracts statistics, per jobs and per VMs, such as start time, end time (or duration), status, and if possible GB copied.
I found some ways to retrieve such information for backup, using Get-VBRBackupSession, but I don't find how to proceed for replications.

On another customer I extract informations directly from SQL Database, but he still uses VB&R v6.0, and my cripts doesn't work any in v6.5 as some element in DB structure changed. And I'd like to avoid to spend a lot of time to identify once again the tables and dependencies to be used.

Then if someone already wrote a powershell script to extract replications statistics, or even if someone has clues on how to write it, it could be great.

Thank to all.
Vitaliy S.
VP, Product Management
Posts: 27114
Liked: 2720 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Replications statistics

Post by Vitaliy S. »

Hi Olivier,

I'm not an expert in this area, our PS forum guru is on vacation now, but as an alternative to a PS script I would suggest reviewing Veeam ONE backup reporting capabilities and especially "Backup Jobs Historical Information" report template.

See this document for further info > http://www.veeam.com/veeamone_7_0_dashb ... rts_pg.pdf

Hope this helps!
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Replications statistics

Post by veremin »

I don't have an access to PS console at the moment, so it's rather hard to check the exact commands. However, I believe that the following information should point you to the right direction:

1) Status.

Job status can be gotten via .GetLastState()method.

Code: Select all

$job = Get-VBRJob -name "Name of your job"
$job.GetLastState()
2) Result.

Job status can be gotten via .GetLastResult() method.

Code: Select all

$Job = Get-VBRJob -name "Name of your job"
$job.GetLastresult()
3) Start/ End time.

As far as I know, job last session should contain these parameters.

Code: Select all

$Job = Get-VBRJob -name "Name of backup copy Job"
$LastSession = $Job.FindLastSession()
$LastSession.creationtime
$LastSession.endtime
Hope this helps.
Thanks.
odruard
Enthusiast
Posts: 40
Liked: 5 times
Joined: Jan 25, 2011 2:12 pm
Full Name: Olivier Druard
Contact:

Re: Replications statistics

Post by odruard »

Thanks, I will try with these first elements.
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests