How do I set DiskFilter and other exclude parameters

PowerShell script exchange

How do I set DiskFilter and other exclude parameters

Veeam Logoby Da PAN » Fri May 24, 2013 10:41 am

Hello,

we are backing up just the system disk of nearly all (VMware) VMs. So we have to add the VMs to a backup job, edit the exclusions, edit every VM to exclude all disks apart from the system disk, change the checkbox "remove disk from backuped VM". This is a part of work we would like to automate. Creating job and adding VMs with Powershell is no problem but how do I change the settings mentioned above for each VM?

Regards
Henry
Da PAN
Lurker
 
Posts: 1
Liked: never
Joined: Wed Nov 10, 2010 2:44 pm

Re: How do I set DiskFilter and other exclude parameters

Veeam Logoby v.Eremin » Fri May 24, 2013 11:42 am

Unfortunately, for now it seems to be a general limitation that DiskFilter options can’t be specified, at least, I don’t know a way how it can be done.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13701
Liked: 1020 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: How do I set DiskFilter and other exclude parameters

Veeam Logoby mdivis » Wed Sep 25, 2013 1:02 pm

this works, though I do no know how far supported it is:

Code: Select all
$job = Get-VBRJob -name test
$objects = $job.GetObjectsInJob()
$object = $objects | where {$_.name -eq 'other64'}
$objInfo = $object.info
$objInfo.diskFilter = '2000;2005'
[Veeam.Backup.Core.CObjectInJob]::Update($objInfo)


will restrict vm's 'other64' backup to disks SCSI0:0 and SCSI0:5
mdivis
Lurker
 
Posts: 1
Liked: never
Joined: Tue Sep 24, 2013 6:49 am
Full Name: Martin Divis

Re: How do I set DiskFilter and other exclude parameters

Veeam Logoby decoy5657 » Mon Dec 02, 2013 4:36 am

Here's a little code block I use. I update my jobs daily w/ a powershell script. SQL boxes only get the system disk w/ Veeam. So I Just added a loop to what mdivis posted.

Code: Select all
$SQLjob = Get-VBRJob -name SQL
$SQLobjects = $SQLjob.GetObjectsInJob()

ForEach ($SQLobject in $SQLobjects)
{
$SQLobjInfo = $SQLobject.info
$SQLobjInfo.diskFilter = '2000'
[Veeam.Backup.Core.CObjectInJob]::Update($SQLobjInfo)
}
decoy5657
Influencer
 
Posts: 12
Liked: 3 times
Joined: Wed Oct 09, 2013 2:45 pm
Full Name: Aaron Anderson

[MERGED] : Can I modify exclusions via PowerShell

Veeam Logoby slide999 » Thu Sep 25, 2014 9:49 pm

Support Case 00642976

Hi - I was wondering if/how I can modify via PowerShell the 'virtual machine exclusions'? I just want disks 0:0 and 0:1 backed. Thanks in advance.
slide999
Lurker
 
Posts: 2
Liked: never
Joined: Thu Sep 25, 2014 9:40 pm
Full Name: Kevin

Re: How do I set DiskFilter and other exclude parameters

Veeam Logoby v.Eremin » Fri Sep 26, 2014 11:05 am

Hi Kevin,

It should be possible with the use of creative workarounds provided above.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13701
Liked: 1020 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

[MERGED] Backup particular drive of a VM?

Veeam Logoby MrJH » Thu Aug 10, 2017 8:13 am

Is this possible? We have a VM with 3 data drives, but I only wish to specify a particular one for backup. Is there a Veeam PS switch for this?
Thanks.
MrJH
Influencer
 
Posts: 14
Liked: 2 times
Joined: Tue Aug 18, 2015 2:01 pm

Re: How do I set DiskFilter and other exclude parameters

Veeam Logoby v.Eremin » Thu Aug 10, 2017 10:32 am

Check the solution coined above. Thanks.
v.Eremin
Veeam Software
 
Posts: 13701
Liked: 1020 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests