-
- Veteran
- Posts: 459
- Liked: 5 times
- Joined: Feb 01, 2012 12:04 pm
- Full Name: Mario
- Contact:
Listing replicated VMs
I need to have a list of replicated VMs with the date of the latest successfull replica.
Replicas folder provides a list of replicated VMs but the date looks to be the date of the first replica, not the latest.
I need to see the current state of replicated VMs in order to say if a replica is current or not.
Can I get such list from Veeam B&R console or should I use PowerShell or any other tool?
Regards
marius
Replicas folder provides a list of replicated VMs but the date looks to be the date of the first replica, not the latest.
I need to see the current state of replicated VMs in order to say if a replica is current or not.
Can I get such list from Veeam B&R console or should I use PowerShell or any other tool?
Regards
marius
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Listing replicated VMs
Hi Marius,
You can either try to create such report with PowerShell or just generate one of these predefined reports in Veeam ONE:
1. Protected VMs
2. Latest Backup Job Status
3. VM Backup Status
Thanks!
You can either try to create such report with PowerShell or just generate one of these predefined reports in Veeam ONE:
1. Protected VMs
2. Latest Backup Job Status
3. VM Backup Status
Thanks!
-
- Service Provider
- Posts: 1
- Liked: never
- Joined: Jun 07, 2016 1:35 pm
- Full Name: Patrick Carpenter
- Contact:
Re: Listing replicated VMs
This should get you started. You can build a hash table and output this information however you'd like:
Code: Select all
$ReplicaSessions = (Get-VBRBackupSession | ? {$_.JobType -like "Replica"} | Get-VbrTaskSession
[array]$VMs = $ReplicaSessions.Name
Foreach ($Vm in $VMs) {
$VmReplicaSessions = $ReplicaSessions | ? {$_.Name -like $Vm}
$RecentReplicaSession = $VmReplicaSessions | Sort-Object { $_.Info.QueuedTime } | Select -Last 1
$JobName = RecentReplicaSession.JobName
$ReplicaPoints = Get-VBRReplica -Name $JobName | Get-VBRRestorePoint
$VmReplicaPoints = $ReplicaPoints | ? {$_.Name -like $Vm }
$VmReplicaPoints = $VmReplicaPoints | Sort-Object {$_.CreationTime};
$RecentReplica = $VmReplicaPoints | ? {$_.IsConsistent -like "True"} | Select -Last 1;
[int32]$ReplicaAge = (New-TimeSpan -Start $RecentReplica.CreationTime -End (Get-Date) ).TotalHours
Write-Host "$Vm`, $JobName`, $ReplicaAge"
}
-
- Veteran
- Posts: 459
- Liked: 5 times
- Joined: Feb 01, 2012 12:04 pm
- Full Name: Mario
- Contact:
[MERGED] Extract job schedule
I have several jobs, each one with a different schedule.
I need to extact a list of all the jobs and, for each job, the scheduled start time and the days the job is scheduled to start, i.e.:
Job001 - 22:30 - 1,2,3,5,7
or
Job002 - 23:00 - Mo,Tu,We,Sa,Su
Is there any sample I can start from?
Regards
Marius
I need to extact a list of all the jobs and, for each job, the scheduled start time and the days the job is scheduled to start, i.e.:
Job001 - 22:30 - 1,2,3,5,7
or
Job002 - 23:00 - Mo,Tu,We,Sa,Su
Is there any sample I can start from?
Regards
Marius
-
- Veteran
- Posts: 1943
- Liked: 247 times
- Joined: Dec 01, 2016 3:49 pm
- Full Name: Dmitry Grinev
- Location: St.Petersburg
- Contact:
Re: Extract job schedule
Hi Mario,
You can obtain the information you're interested in by using Veeam ONE report called Protected VMs Job Schedule.
Regarding Powershell I found a script on the forum that should solve your request. Thanks!
You can obtain the information you're interested in by using Veeam ONE report called Protected VMs Job Schedule.
Regarding Powershell I found a script on the forum that should solve your request. Thanks!
-
- Veteran
- Posts: 459
- Liked: 5 times
- Joined: Feb 01, 2012 12:04 pm
- Full Name: Mario
- Contact:
[MERGED] Listing jobs and VMs
I need to create a report including a list of all backup jobs currently existing and, for each job:
Is there an sample I can start from?
Regards
Marius
- a list of the VMs included in the job (including the VMs that are porocessed because they are inside a given folder)
- the scheduling information.
Is there an sample I can start from?
Regards
Marius
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Extract job schedule
Marius,
You can start with the script mentioned above by Dmitry to review the schedule of your jobs, plus take at the example that was given by Patrick Carpenter to list all VMs in the job.
Hope this helps!
You can start with the script mentioned above by Dmitry to review the schedule of your jobs, plus take at the example that was given by Patrick Carpenter to list all VMs in the job.
Hope this helps!
-
- Novice
- Posts: 8
- Liked: 2 times
- Joined: Nov 06, 2010 12:24 am
- Full Name: Jeff Roback
- Contact:
Re: Listing replicated VMs
The above script had a couple of typos, here's a revised version. Haven't validated 100% that this does what is expected, but it now runs without errors
Code: Select all
$ReplicaSessions = (Get-VBRBackupSession | ? {$_.JobType -like "Replica"} | Get-VbrTaskSession)
[array]$VMs = $ReplicaSessions.Name
ForEach ($Vm in $VMs) {
$VmReplicaSessions = $ReplicaSessions | ? {$_.Name -like $Vm}
$RecentReplicaSession = $VmReplicaSessions | Sort-Object { $_.Info.QueuedTime } | Select -Last 1
$JobName = $RecentReplicaSession.JobName
$ReplicaPoints = Get-VBRReplica -Name $JobName | Get-VBRRestorePoint
$VmReplicaPoints = $ReplicaPoints | ? {$_.Name -like $Vm }
$VmReplicaPoints = $VmReplicaPoints | Sort-Object {$_.CreationTime};
$RecentReplica = $VmReplicaPoints | ? {$_.IsConsistent -like "True"} | Select -Last 1;
[int32]$ReplicaAge = (New-TimeSpan -Start $RecentReplica.CreationTime -End (Get-Date) ).TotalHours
Write-Host "$Vm`, $JobName`, $ReplicaAge"
}
Who is online
Users browsing this forum: Google [Bot] and 23 guests