-
- Novice
- Posts: 4
- Liked: 2 times
- Joined: Dec 11, 2016 1:05 pm
- Full Name: -
- Contact:
List VM:s which are backed up by job.
Hello,
Long story short: is there easy way to report all VM:s certain backup job actually works on?
Not this option:
$job = get-vbrjob JOBNAME
$job.getobjectsinjob()
because it does not show virtual machines in containers, such as vCenter object or folder.
I'm having difficulties listing VM:s in backup jobs.
We have several backup jobs, both as inclusions and exclusions we use both single VMs, and folders or other containers.
For example one job has vCenter server as included object, and several VMs and folders as exclusion.
Getting list of items in jobs is simple, and from there I can select included or excluded objects. But the problem is how to get objects under vCenter or folder.
I thought that workaround for this would be pulling list of VMs from vCenter using powercli and cross referensing list of excluded VMs and included vms and/or vms under certain object.
But this will be awful mess of a script.
-Mikko
Long story short: is there easy way to report all VM:s certain backup job actually works on?
Not this option:
$job = get-vbrjob JOBNAME
$job.getobjectsinjob()
because it does not show virtual machines in containers, such as vCenter object or folder.
I'm having difficulties listing VM:s in backup jobs.
We have several backup jobs, both as inclusions and exclusions we use both single VMs, and folders or other containers.
For example one job has vCenter server as included object, and several VMs and folders as exclusion.
Getting list of items in jobs is simple, and from there I can select included or excluded objects. But the problem is how to get objects under vCenter or folder.
I thought that workaround for this would be pulling list of VMs from vCenter using powercli and cross referensing list of excluded VMs and included vms and/or vms under certain object.
But this will be awful mess of a script.
-Mikko
-
- VP, Product Management
- Posts: 27577
- Liked: 2869 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: List VM:s which are backed up by job.
Hi Mikko,
While you're waiting for assistance from PowerShell experts, try to take a look at these predefined reports in Veeam ONE, should help: VM Backup Status and Protected VMs.
Thanks!
While you're waiting for assistance from PowerShell experts, try to take a look at these predefined reports in Veeam ONE, should help: VM Backup Status and Protected VMs.
Thanks!
-
- Novice
- Posts: 4
- Liked: 2 times
- Joined: Dec 11, 2016 1:05 pm
- Full Name: -
- Contact:
Re: List VM:s which are backed up by job.
Hello Vitaliy,
thank you for the reply, Veeam ONE reports are not an option in this case, for I need to build automatic report mechanism for several environements, of which all do not have Veeam ONE. And Veeam ONE free does not allow modifying reports, or sending them automatically (as far as I know).
-Mikko
thank you for the reply, Veeam ONE reports are not an option in this case, for I need to build automatic report mechanism for several environements, of which all do not have Veeam ONE. And Veeam ONE free does not allow modifying reports, or sending them automatically (as far as I know).
-Mikko
-
- Product Manager
- Posts: 8223
- Liked: 1334 times
- Joined: Feb 08, 2013 3:08 pm
- Full Name: Mike Resseler
- Location: Belgium
- Contact:
Re: List VM:s which are backed up by job.
Mikko,
Might not be what you exactly meant but:
* Modifying reports in Veeam ONE: https://helpcenter.veeam.com/docs/one/r ... tml?ver=95
* Publishing them automatically: https://helpcenter.veeam.com/docs/one/r ... tml?ver=95 (on a URL)
* Sending them automatically: https://helpcenter.veeam.com/docs/one/r ... tml?ver=95
Brgds,
Mike
Might not be what you exactly meant but:
* Modifying reports in Veeam ONE: https://helpcenter.veeam.com/docs/one/r ... tml?ver=95
* Publishing them automatically: https://helpcenter.veeam.com/docs/one/r ... tml?ver=95 (on a URL)
* Sending them automatically: https://helpcenter.veeam.com/docs/one/r ... tml?ver=95
Brgds,
Mike
-
- Veeam Software
- Posts: 1838
- Liked: 661 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: List VM:s which are backed up by job.
Hi,
You can take a look at the last session and it's task sessions
You can take a look at the last session and it's task sessions
Code: Select all
$session = $job.FindLastSession()
$session.GetTaskSessions()
-
- Novice
- Posts: 4
- Liked: 2 times
- Joined: Dec 11, 2016 1:05 pm
- Full Name: -
- Contact:
Re: List VM:s which are backed up by job.
Hello,
thank you for replies.
Mike: scheduling reports seemingly works on Veeam ONE free: you can create schedule for report, but it is not sent. We do not have full Veeam ONE in every environment. Hence PowerShell, and further powershell version can be integrated to other reports.
tdewin: this might be right direction. But how can I find the last "proper" run, not the retry runs?
-Mikko
thank you for replies.
Mike: scheduling reports seemingly works on Veeam ONE free: you can create schedule for report, but it is not sent. We do not have full Veeam ONE in every environment. Hence PowerShell, and further powershell version can be integrated to other reports.
tdewin: this might be right direction. But how can I find the last "proper" run, not the retry runs?
-Mikko
-
- Veeam Software
- Posts: 1838
- Liked: 661 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: List VM:s which are backed up by job.
You can actually use get-vbrbackupsession to return all session and on that session you can get-vbrtasksession
https://helpcenter.veeam.com/backup/pow ... ssion.html
https://helpcenter.veeam.com/backup/pow ... ssion.html
https://helpcenter.veeam.com/backup/pow ... ssion.html
https://helpcenter.veeam.com/backup/pow ... ssion.html
-
- Product Manager
- Posts: 20681
- Liked: 2383 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List VM:s which are backed up by job.
Does this thread look like something you're after? Thanks.
-
- Novice
- Posts: 4
- Liked: 2 times
- Joined: Dec 11, 2016 1:05 pm
- Full Name: -
- Contact:
Re: List VM:s which are backed up by job.
Hello,
Thanks for replies. Thread posted by v.Eremin is definitely interesting, however tdewins get-vbrbackupsession and get-vbrtasksession were solution I was looking for.
Script below gives list of all VMs in selected jobs, and job names. After that it'll be quite simple to do outputs as needed. Getting correct lists of objects required getting retry -jobs out from vbrbackupsession -list.
Thanks for replies. Thread posted by v.Eremin is definitely interesting, however tdewins get-vbrbackupsession and get-vbrtasksession were solution I was looking for.
Script below gives list of all VMs in selected jobs, and job names. After that it'll be quite simple to do outputs as needed. Getting correct lists of objects required getting retry -jobs out from vbrbackupsession -list.
Code: Select all
add-pssnapin veeampssnapin
$jobs = get-vbrjob -name PATTERN_FOR_JOB_NAMES*
$vms_in_jobs = new-object System.Collections.ArrayList
$allsessions = get-vbrbackupsession
foreach ($job in $jobs){
echo $job.name
$vms_protected_by_job = $null
$vms_protected_by_job = ($allsessions | where {($_.jobname -like $job.Name) -and ($_.name -notlike "*Retry*") } | sort-object CreationTimeUTC -Descending)[0] | get-vbrtasksession
foreach ($vm_protected_by_job in $vms_protected_by_job){
$vm_in_job = New-Object PSObject
Add-Member -InputObject $vm_in_job -MemberType NoteProperty -Name Name -Value $vm_protected_by_job.name
Add-Member -InputObject $vm_in_job -MemberType NoteProperty -Name JobName -value $vm_protected_by_job.jobname
$vms_in_jobs.add($vm_in_job) | out-null
}
}
$vms_in_jobs_compare1 = $vms_in_jobs.name
$vms_in_jobs_compare2 = $vms_in_jobs_compare1 | select -unique
Compare-Object $vms_in_jobs_compare1 $vms_in_compare2
-
- Veteran
- Posts: 254
- Liked: 14 times
- Joined: Nov 23, 2015 10:56 pm
- Full Name: Peter Shute
- Contact:
[MERGED] Checking which servers aren't in a backup job
Is there any way to get a list of servers that aren't included in a backup job?
When I add a server to an existing backup job, I have to choose from the list of all servers on the cluster. It would be nice if there was some indication of which ones are already included in the job.
When I add a server to an existing backup job, I have to choose from the list of all servers on the cluster. It would be nice if there was some indication of which ones are already included in the job.
-
- Product Manager
- Posts: 6581
- Liked: 787 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: List VM:s which are backed up by job.
Hi,
You can either use one of the abovementioned PS scripts, or stick with one of Veeam ONE reports.
Thanks
You can either use one of the abovementioned PS scripts, or stick with one of Veeam ONE reports.
Thanks
-
- Veteran
- Posts: 254
- Liked: 14 times
- Joined: Nov 23, 2015 10:56 pm
- Full Name: Peter Shute
- Contact:
Re: List VM:s which are backed up by job.
Thanks. Can I please suggest as an enhancement to Backup & Replication that when one is selecting servers to include in a job, that it flags those already in the job? Even if I write a script to list them, I'd still have to carefully compare the list with the list on screen. That seems a bit hit and miss.PTide wrote:Hi,
You can either use one of the abovementioned PS scripts, or stick with one of Veeam ONE reports.
Thanks
-
- Product Manager
- Posts: 5930
- Liked: 1241 times
- Joined: Jul 15, 2013 11:09 am
- Full Name: Niels Engelen
- Contact:
Re: List VM:s which are backed up by job.
You can always modify the job to use objects like folders or datastores so you don't have to manually add the servers to the job.
GitHub: https://github.com/nielsengelen
-
- Veteran
- Posts: 254
- Liked: 14 times
- Joined: Nov 23, 2015 10:56 pm
- Full Name: Peter Shute
- Contact:
Re: List VM:s which are backed up by job.
Thanks, I didn't know you could do that. We already have a folder for servers. I will discuss with colleagues whether we should change to that method of vm selection. It has the disadvantage that a machine will be left out if it's placed in the wrong folder, and until now placement has been done by people not involved with backups. I can see a couple out of place now. It hasn't mattered in the past, so it would require a change of culture to make it reliable.vmniels wrote:You can always modify the job to use objects like folders or datastores so you don't have to manually add the servers to the job.
Can you use both methods at the same time? That might be a good compromise - we could specifically include particular machines, and use the folders to catch any forgotten ones.
I would still like to see machines highlighted in the selection list if they're already in the job. It just seems like a good thing to have as a double check. I don't think I've ever come across any other backup software where you don't just tick a box beside each object - if it's already ticked then it's already included.
-
- Product Manager
- Posts: 8223
- Liked: 1334 times
- Joined: Feb 08, 2013 3:08 pm
- Full Name: Mike Resseler
- Location: Belgium
- Contact:
Re: List VM:s which are backed up by job.
Hi Peter,
Yes, you can use different methods at the same time.
Yes, you can use different methods at the same time.
-
- Lurker
- Posts: 1
- Liked: never
- Joined: Jan 11, 2017 12:43 am
- Full Name: Nilay
- Contact:
[MERGED] Script to see which VM's are getting backed up
Hello,
I am looking for Power Shell Script for B&R 9.5 Version that will give me output of List of VM's on my VMware Environment are getting backed up and which ones aren't getting backed up. If there is report query in the Veeam that is available that would help as well.
Thank You
Nilay
I am looking for Power Shell Script for B&R 9.5 Version that will give me output of List of VM's on my VMware Environment are getting backed up and which ones aren't getting backed up. If there is report query in the Veeam that is available that would help as well.
Thank You
Nilay
-
- VP, Product Management
- Posts: 27577
- Liked: 2869 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Script to see which VM's are getting backed up
Hi Nilay,
Please take a look at these topics for the answer > one you've been merged into and this one
Thanks!
Please take a look at these topics for the answer > one you've been merged into and this one
Thanks!
-
- Veteran
- Posts: 954
- Liked: 54 times
- Joined: Nov 05, 2009 12:24 pm
- Location: Sydney, NSW
- Contact:
Re: List VM:s which are backed up by job.
I'd like to know how can I get the backup report from Veeam Backup to see:
Hi All,
Can anyone here please share the Powershell script to list or export:
Which VM is backed up
What's the Backup frequency
Where the backup is saved/stored
How long is the retention policy for the VM backup to be retained
Thanks in advance.
Hi All,
Can anyone here please share the Powershell script to list or export:
Which VM is backed up
What's the Backup frequency
Where the backup is saved/stored
How long is the retention policy for the VM backup to be retained
Thanks in advance.
--
/* Veeam software enthusiast user & supporter ! */
/* Veeam software enthusiast user & supporter ! */
Who is online
Users browsing this forum: No registered users and 47 guests