-
- Enthusiast
- Posts: 94
- Liked: 6 times
- Joined: Jun 04, 2013 8:15 am
- Contact:
Feature request: exclusions filters
Another feature request Lets imagine that I have two backup jobs created. One job archives Windows VMs and another Linux VMs. With currecnt program implementation I'm able to achieve this if I'll exclude all Linux machines in one job and if I'll exclude all Windows machines in another job. As I can understand - I must do all of these exclusions manualy or am I wrong? It would be nice to have some kind of exclusions filtering ability, for example I salect to archive one esx host and apply filter to skip all Linux machines. So in case when someone will create new linux machine it will be skiped automaticly by the job which archives windows machines. I'll not be forced to make any exclusions by myself.
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Feature request: exclusions filters
Unfortunately, it’s not possible with the current VB&R version. However, you can always become a little creative and utilize custom PS script that, once executed, will find and exclude any linux/window machine present within a given job.
Thanks.
Thanks.
-
- Enthusiast
- Posts: 94
- Liked: 6 times
- Joined: Jun 04, 2013 8:15 am
- Contact:
Re: Feature request: exclusions filters
Can you point me to such a script:) And then again - maybe another feature request?:)
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Feature request: exclusions filters
The discussion has been moved to the corresponding sub forum.
This script will exclude from a given job VMs which operating system isn’t Windows.
Hope this helps.
Thanks.
Yep, the following script might answer your requirements:Can you point me to such a script
Code: Select all
Asnp VMware.VimAutomation.Core
Asnp VeeamPSSnapin
Connect-VIServer -Server "Name of your vCenter" -User "User name" -Password "Password"
$Objects = Get-VBRJob -name "Name of your job" | Get-VBRJobObject
Foreach ($Object in $Objects)
{
If (((Get-VM -name $Object.name | Get-View).summary.config.guestFullName) -notmatch "Windows")
{
$Object | Remove-VBRJobObject
}
}
This script will exclude from a given job VMs which operating system isn’t Windows.
Hope this helps.
Thanks.
-
- Enthusiast
- Posts: 94
- Liked: 6 times
- Joined: Jun 04, 2013 8:15 am
- Contact:
Re: Feature request: exclusions filters
Thank you for this script very much. Bu I hope that you'll be able to implement more advanced filtering options via GUI in the near future:)
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Feature request: exclusions filters
Glad that you find this script useful. As to the features, all of them are prioritized in accordance with customers’ demand. So, thank you for the feedback; much appreciated.
-
- Enthusiast
- Posts: 94
- Liked: 6 times
- Joined: Jun 04, 2013 8:15 am
- Contact:
Re: Feature request: exclusions filters
Ok, tried this script. It seems that it works, but....
...but problem is that my job has two esx servers selected and not virtual machines selected. In that case script does not work. What are my options then?
...but problem is that my job has two esx servers selected and not virtual machines selected. In that case script does not work. What are my options then?
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Feature request: exclusions filters
You mean that ESX(i) hosts where given VMs reside on have been added to backup console as standalone host and not as a part of vCenter? Thanks....but problem is that my job has two esx servers selected and not virtual machines selected
-
- Enthusiast
- Posts: 94
- Liked: 6 times
- Joined: Jun 04, 2013 8:15 am
- Contact:
Re: Feature request: exclusions filters
No,v.Eremin wrote:You mean that ESX(i) hosts where given VMs reside on have been added to backup console as standalone host and not as a part of vCenter? Thanks.
All of ESX servers are part of vcenter server. Problem is, that when I create backup job I select ESXi servers to backup (virtual machines to backup window), not individual VM machines. I want to have a flexible situation - when new VM appears on this esxi - it is backed up automatically without any additional intervention. And in this case script doesn't work, as it expects to have VMs in job settings and not ESXi servers.
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Feature request: exclusions filters
Then, it seems that there is no supported way how you can achieve it. For now you can probably take the following algorithm and implement it in your script, however, do it on your own risk:
Hope this helps.
Thanks.
Code: Select all
Asnp VMware.VimAutomation.Core
Asnp VeeamPSSnapin
$Job = Get-VBRJob -name "Name of Your backup Job"
$Repo = Get-VBRBackupRepository -name "Name of your Repository"
$Server = Get-VBRServer -name "Name of your ESX(i) host"
$ESXServer = Get-VBRJob -name $Job.name | Get-VBRJobObject
Connect-VIServer -Server $ESXServer.name -User "User" -Password "Password"
$Object = Get-VM | where {(($_ |Get-View).summary.config.guestFullName) -notmatch "Windows"}
$ObjectsToExclude = Find-VBRViEntity -Server $Server -name $Object.name
Add-VBRViBackupJob -Name "Temprorary Job" -BackupRepository $Repo -Entity $ObjectsToExclude
$Job1 = Get-VBRJob -name "Temprorary Job"
Foreach ($VmToExclude in ($Job1 | Get-VBRJobObject))
{
$VmToExclude.name
[Veeam.Backup.Core.CObjectInJob]::CreateViOij($Job.Id.guid, $VmToExclude.Object.Id.Guid, $VmToExclude.info.folderId, $VmToExclude.info.VssOptions, $VmToExclude.info.ApproxSize, $VmToExclude.info.Location, $VmToExclude.info.type,$VmToExclude.info.DiskFilter, $False)
$Objects = Get-VBRJob -name $Job.name | Get-VBRJobObject | ?{$_.name -eq $VmToExclude.name}
$Objects | Remove-VBRJobObject
$Objects.delete()
}
Remove-VBRJob -Job $Job1 -Confirm:$False
Hope this helps.
Thanks.
-
- Enthusiast
- Posts: 94
- Liked: 6 times
- Joined: Jun 04, 2013 8:15 am
- Contact:
Re: Feature request: exclusions filters
Ok, thanks for the script, I'll try to understand it:) But please, implement more advanced filtering in your product:)
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Feature request: exclusions filters
Feel free to ask any question and I will be glad to assist you in your understanding.Ok, thanks for the script, I'll try to understand it:)
Generally speaking, I’ve just implemented the algorithm mentioned above. So:
• Firstly, it connects to ESX(i) server and finds VMs which OS isn’t windows.
• Secondly, a temp job is being created (“Temporary job”)
• Thirdly, VMs collected at step 1, are added to the temp job.
• Fourthly, for each VM script creates object of the ”CObjectInJob” type.
• Fifthly, these objects are excluded from a given job.
• Finally, the temp job is deleted.
Got your point. Thanks again for the feedback.But please, implement more advanced filtering in your product:)
-
- Lurker
- Posts: 1
- Liked: never
- Joined: Nov 12, 2012 7:29 pm
- Contact:
Re: Feature request: exclusions filters
Put the Windows VM's in one folder and the Linux VM's in another folder.
Exclude the Linux VM's folder from the Windows Job.
Exclude the Windows VM's folder from the Linux Job.
Exclude the Linux VM's folder from the Windows Job.
Exclude the Windows VM's folder from the Linux Job.
-
- Enthusiast
- Posts: 94
- Liked: 6 times
- Joined: Jun 04, 2013 8:15 am
- Contact:
Re: Feature request: exclusions filters
I use folders for a logical grouping of my VMs, so I can't do that.
-
- Influencer
- Posts: 12
- Liked: 3 times
- Joined: Oct 09, 2013 2:45 pm
- Full Name: Aaron Anderson
- Contact:
[MERGED] : Exclude VM's from job that backs up entire Cluste
I have a job that backs up an entire cluster named "Development" - I need to be able to add exclusions to this job based on the name of the machine. IE, I want to exclude machines that match
I have gotten some scripts that work, but only if the "objects in the job" are a full list of virtual machines, which isn't much help since my only object is an entire cluster.
any help would be appreciated.
Code: Select all
"*b"
any help would be appreciated.
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Feature request: exclusions filters
Hi, Aaron.
I’ve already created a script that does something similar to what you’ve requested with the only exception that the script covers the case with ESX(i) host instead of cluster. So, if you modify it a little bit, it will meet your requirements.
Thanks.
I’ve already created a script that does something similar to what you’ve requested with the only exception that the script covers the case with ESX(i) host instead of cluster. So, if you modify it a little bit, it will meet your requirements.
Thanks.
-
- Influencer
- Posts: 12
- Liked: 3 times
- Joined: Oct 09, 2013 2:45 pm
- Full Name: Aaron Anderson
- Contact:
Re: Feature request: exclusions filters
Code: Select all
Add-PSSnapin VMware.VimAutomation.Core
Add-PSSnapin VeeamPSSnapin
Connect-VIServer server.local.lan
Clear-Host
$DevClusterVMsToAdd = Get-Cluster "Development" | Get-VM | Where-Object {$_.Name -notlike "*b"}
Add-VBRJobObject -Job "Development" -Server server.local.lan -Objects $DevClusterVMsToAdd
$ProductionClusterVMsToAdd = Get-Cluster "Production" | Get-VM | Where-Object {$_.Name -notlike "*b"}
Add-VBRJobObject -Job "Production" -Server server.local.lan -Objects $ProductionClusterVMsToAdd
-
- Influencer
- Posts: 12
- Liked: 3 times
- Joined: Oct 09, 2013 2:45 pm
- Full Name: Aaron Anderson
- Contact:
Re: Feature request: exclusions filters
v.Eremin wrote:Hi, Aaron.
I’ve already created a script that does something similar to what you’ve requested with the only exception that the script covers the case with ESX(i) host instead of cluster. So, if you modify it a little bit, it will meet your requirements.
Thanks.
This? http://forums.veeam.com/viewtopic.php?f ... 021#p81321
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Feature request: exclusions filters
Yep, you have to:
• Firstly, connect to vCenter server and find VMs that reside on a given cluster and that have names starting with “b”.
• Secondly, create a temp job (“Temporary job”).
• Thirdly, add to the temp job VMs collected at step 1.
• Fourthly, for each VM create object of the ”CObjectInJob” type.
• Fifthly, exclude the said objects from a given job.
• Finally, delete temporary job.
Hope this helps.
Thanks.
• Firstly, connect to vCenter server and find VMs that reside on a given cluster and that have names starting with “b”.
• Secondly, create a temp job (“Temporary job”).
• Thirdly, add to the temp job VMs collected at step 1.
• Fourthly, for each VM create object of the ”CObjectInJob” type.
• Fifthly, exclude the said objects from a given job.
• Finally, delete temporary job.
Hope this helps.
Thanks.
-
- Expert
- Posts: 122
- Liked: 7 times
- Joined: Mar 27, 2012 10:13 pm
- Full Name: Chad Killion
- Contact:
[MERGED] Looking for an easy way to add an exclusion to all
Hello,
I have a client with a large number of backups. All jobs are setup to backup entire datastores. Sometimes they will storageVmotion disks within individual machines to different datastores. There are certain machines which are excluded from backups but when they move the disks to other datstores those machines get picked up by the other datastore job because there are no exclusions. I am looking for a way to write a script which will take VM names or Folders as inputs and will add (or verify if already added) those to the exclusions for either a given job or for all jobs. Can this be done easily?
I have a client with a large number of backups. All jobs are setup to backup entire datastores. Sometimes they will storageVmotion disks within individual machines to different datastores. There are certain machines which are excluded from backups but when they move the disks to other datstores those machines get picked up by the other datastore job because there are no exclusions. I am looking for a way to write a script which will take VM names or Folders as inputs and will add (or verify if already added) those to the exclusions for either a given job or for all jobs. Can this be done easily?
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Feature request: exclusions filters
Hi, I have already created the script that excludes certain VMs out of the backup job, in case where container (folder, datastore) is selected as the job object. The only thing that has to be modified here is $ObjectsToExclude variable.
Please, take a look and ask if any additional help is needed.
Thanks.
Please, take a look and ask if any additional help is needed.
Thanks.
Who is online
Users browsing this forum: No registered users and 21 guests