-
- Lurker
- Posts: 1
- Liked: never
- Joined: Nov 10, 2010 2:44 pm
- Contact:
How do I set DiskFilter and other exclude parameters
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
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
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How do I set DiskFilter and other exclude parameters
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.
Thanks.
-
- Lurker
- Posts: 1
- Liked: never
- Joined: Sep 24, 2013 6:49 am
- Full Name: Martin Divis
- Contact:
Re: How do I set DiskFilter and other exclude parameters
this works, though I do no know how far supported it is:
will restrict vm's 'other64' backup to disks SCSI0:0 and SCSI0:5
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)
-
- Influencer
- Posts: 12
- Liked: 3 times
- Joined: Oct 09, 2013 2:45 pm
- Full Name: Aaron Anderson
- Contact:
Re: How do I set DiskFilter and other exclude parameters
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)
}
-
- Novice
- Posts: 5
- Liked: never
- Joined: Sep 25, 2014 9:40 pm
- Full Name: Kevin
- Contact:
[MERGED] : Can I modify exclusions via PowerShell
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.
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.
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How do I set DiskFilter and other exclude parameters
Hi Kevin,
It should be possible with the use of creative workarounds provided above.
Thanks.
It should be possible with the use of creative workarounds provided above.
Thanks.
-
- Influencer
- Posts: 14
- Liked: 2 times
- Joined: Aug 18, 2015 2:01 pm
- Contact:
[MERGED] Backup particular drive of a VM?
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.
Thanks.
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How do I set DiskFilter and other exclude parameters
Check the solution coined above. Thanks.
-
- Influencer
- Posts: 10
- Liked: never
- Joined: Aug 14, 2015 12:21 pm
- Full Name: Daniel
- Contact:
Re: How do I set DiskFilter and other exclude parameters
Hi,
is there a way to disable the diskfilter with powershell?
i need "All disks"
Thanks
is there a way to disable the diskfilter with powershell?
i need "All disks"
Thanks
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How do I set DiskFilter and other exclude parameters
Check the following script:
Thanks!
Code: Select all
asnp VeeamPSSnapin
$job = Get-VBRJob -name "Name of your Job"
$objects = $job.GetObjectsInJob()
ForEach ($object in $objects)
{
$ObjectInfo = $Object.info
$objectinfo.diskfilter = 'Ver8|3000;3001;3002;3003;2000;2001;2002;2003;2004;2005;2006;2008;2009;2010;2011;2012;2013;2014;2015;2016;2017;2018;2019;2020;2021;2022;2024;2025;2026;2027;2028;2029;2030;2031;2032;2033;2034;2035;2036;2037;2038;2040;2041;2042;2043;2044;2045;2046;2047;2048;2049;2050;2051;2052;2053;2054;2056;2057;2058;2059;2060;2061;2062;2063;16000;16001;16002;16003;16004;16005;16006;16007;16008;16009;16010;16011;16012;16013;16014;16015;16016;16017;16018;16019;16020;16021;16022;16023;16024;16025;16026;16027;16028;16029;16030;16031;16032;16033;16034;16035;16036;16037;16038;16039;16040;16041;16042;16043;16044;16045;16046;16047;16048;16049;16050;16051;16052;16053;16054;16055;16056;16057;16058;16059;16060;16061;16062;16063;16064;16065;16066;16067;16068;16069;16070;16071;16072;16073;16074;16075;16076;16077;16078;16079;16080;16081;16082;16083;16084;16085;16086;16087;16088;16089;16090;16091;16092;16093;16094;16095;16096;16097;16098;16099;16100;16101;16102;16103;16104;16105;16106;16107;16108;16109;16110;16111;16112;16113;16114;16115;16116;16117;16118;16119;32000;32001;32002;32003;32004;32005;32006;32007;32008;32009;32010;32011;32012;32013;32014;32015;32016;32017;32018;32019;32020;32021;32022;32023;32024;32025;32026;32027;32028;32029;32030;32031;32032;32033;32034;32035;32036;32037;32038;32039;32040;32041;32042;32043;32044;32045;32046;32047;32048;32049;32050;32051;32052;32053;32054;32055;32056;32057;32058;32059'
[Veeam.Backup.Core.CObjectInJob]::Update($ObjectInfo)
}
-
- Influencer
- Posts: 10
- Liked: never
- Joined: Aug 14, 2015 12:21 pm
- Full Name: Daniel
- Contact:
Re: How do I set DiskFilter and other exclude parameters
Thanks a lot, I was thinking about this solution but i didn't think
it would put the hook (translate bei google )
it would put the hook (translate bei google )
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How do I set DiskFilter and other exclude parameters
You're welcome. Should other help be needed, feel free to reach us. Thanks!
-
- Influencer
- Posts: 11
- Liked: never
- Joined: Dec 01, 2014 12:50 pm
- Full Name: Rob Verhees
- Contact:
[MERGED] Veeam Udpate 4 JobobjectDiskfilter
Goodmorning,
With Veeam Update 4 the jobobject diskfilter property is changed in PowerShell.
Have some issues with setting it to "selected disks", any idea how to archive this with the new commands?
When trying to change it, it says "ReadOnly Property"
Key DisplayName
--- -----------
IDE 0:0 (3000) IDE (0:0)
IDE 0:1 (3001) IDE (0:1)
IDE 1:0 (3002) IDE (1:0)
IDE 1:1 (3003) IDE (1:1)
SCSI 0:0 (2000) SCSI (0:0)
SCSI 0:1 (2001) SCSI (0:1)
SCSI 0:2 (2002) SCSI (0:2)
With Veeam Update 4 the jobobject diskfilter property is changed in PowerShell.
Have some issues with setting it to "selected disks", any idea how to archive this with the new commands?
When trying to change it, it says "ReadOnly Property"
Key DisplayName
--- -----------
IDE 0:0 (3000) IDE (0:0)
IDE 0:1 (3001) IDE (0:1)
IDE 1:0 (3002) IDE (1:0)
IDE 1:1 (3003) IDE (1:1)
SCSI 0:0 (2000) SCSI (0:0)
SCSI 0:1 (2001) SCSI (0:1)
SCSI 0:2 (2002) SCSI (0:2)
-
- Influencer
- Posts: 11
- Liked: never
- Joined: Dec 01, 2014 12:50 pm
- Full Name: Rob Verhees
- Contact:
Re: Veeam Udpate 4 JobobjectDiskfilter
Update:
--> Current Diskfilter
PS C:\WINDOWS\system32> $jobobject.diskfilter
Disks DiskNamePatterns IsVer8Format
----- ---------------- ------------
{IDE (0:0), IDE (0:1), IDE (1:0), IDE (1:1)...} {} True
--> Created Diskfilter Object
PS C:\WINDOWS\system32> $an
Disks DiskNamePatterns IsVer8Format
----- ---------------- ------------
{SCSI (0:0)} {} True
PS C:\WINDOWS\system32> $jobobject.diskfilter = $an
The property 'diskfilter' cannot be found on this object. Verify that the property exists and can be set.
Or
PS C:\WINDOWS\system32> [Veeam.Backup.Core.CObjectInJob]::Update($an)
Cannot convert argument "oijInfo", with value: "Veeam.Backup.Core.CDiskFilter", for "Update" to type "Veeam.Backup.Model.CDbObjectInJobInfo": "Cannot convert the "Veeam.Backup.Core.CDiskFi
lter" value of type "Veeam.Backup.Core.CDiskFilter" to type "Veeam.Backup.Model.CDbObjectInJobInfo".
--> Current Diskfilter
PS C:\WINDOWS\system32> $jobobject.diskfilter
Disks DiskNamePatterns IsVer8Format
----- ---------------- ------------
{IDE (0:0), IDE (0:1), IDE (1:0), IDE (1:1)...} {} True
--> Created Diskfilter Object
PS C:\WINDOWS\system32> $an
Disks DiskNamePatterns IsVer8Format
----- ---------------- ------------
{SCSI (0:0)} {} True
PS C:\WINDOWS\system32> $jobobject.diskfilter = $an
The property 'diskfilter' cannot be found on this object. Verify that the property exists and can be set.
Or
PS C:\WINDOWS\system32> [Veeam.Backup.Core.CObjectInJob]::Update($an)
Cannot convert argument "oijInfo", with value: "Veeam.Backup.Core.CDiskFilter", for "Update" to type "Veeam.Backup.Model.CDbObjectInJobInfo": "Cannot convert the "Veeam.Backup.Core.CDiskFi
lter" value of type "Veeam.Backup.Core.CDiskFilter" to type "Veeam.Backup.Model.CDbObjectInJobInfo".
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How do I set DiskFilter and other exclude parameters
What exact disks you have to have selected? Thanks!
-
- Veeam Vanguard
- Posts: 282
- Liked: 113 times
- Joined: Apr 20, 2017 4:19 pm
- Full Name: Joe Houghes
- Location: Castle Rock, CO
- Contact:
Re: How do I set DiskFilter and other exclude parameters
I had shown someone how to do this recently to set a tag object as an exclude and used the Update method for this.
Post is here: post314628.html#p314628
Post is here: post314628.html#p314628
Husband, Father, Solutions Architect, Geek | @DenverVMUG & @DenverPSUG leader | International Speaker | Veeam Vanguard | vExpert (PRO) | Cisco Champion
-
- Influencer
- Posts: 11
- Liked: never
- Joined: Dec 01, 2014 12:50 pm
- Full Name: Rob Verhees
- Contact:
Re: How do I set DiskFilter and other exclude parameters
Hello Guys,
I found how to change the diskfilter using PowerShell after Veeam 9.5 Update 4.
Edited my previous blog with my new findings:
http://robvit.com/veeam/backup_replicat ... powershell
I found how to change the diskfilter using PowerShell after Veeam 9.5 Update 4.
Edited my previous blog with my new findings:
http://robvit.com/veeam/backup_replicat ... powershell
-
- Novice
- Posts: 7
- Liked: 1 time
- Joined: Apr 02, 2019 3:06 pm
- Full Name: theq
- Contact:
[MERGED] Exclude Disk with powershell
I want to exclude SCSI disks from a backup job.
I found this Information:
http://robvit.com/veeam/backup_replicat ... owershell/
powershell-f26/add-vm-s-to-exclusions-list-t21575.html
when I add the vm with
Add-VBRViJobObject -Job $jobname -Entities (Find-VBRViEntity -Name $vmname)
Get-VBRJobObject -Job $jobname -Name $vmname | Remove-VBRJobObject
I get the VM in Exclusions/VMs but not in Exclusions/Disks, where it should be.
Any ideas?
tia!
I found this Information:
http://robvit.com/veeam/backup_replicat ... owershell/
powershell-f26/add-vm-s-to-exclusions-list-t21575.html
when I add the vm with
Add-VBRViJobObject -Job $jobname -Entities (Find-VBRViEntity -Name $vmname)
Get-VBRJobObject -Job $jobname -Name $vmname | Remove-VBRJobObject
I get the VM in Exclusions/VMs but not in Exclusions/Disks, where it should be.
Any ideas?
tia!
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How do I set DiskFilter and other exclude parameters
What exact SCSI disks you're trying to exclude (0:1, 0:2, etc.)? Or you're trying to exclude them all? Thanks!
-
- Veeam Vanguard
- Posts: 282
- Liked: 113 times
- Joined: Apr 20, 2017 4:19 pm
- Full Name: Joe Houghes
- Location: Castle Rock, CO
- Contact:
Re: How do I set DiskFilter and other exclude parameters
The 'Remove-VBRJobObject' cmdlet will set the entire VM as an excluded object from a job.
If you are looking to exclude only specific disks, that is where you want to follow Rob's post about the DiskArray object creation and the Update method of the job object itself.
If you are looking to exclude only specific disks, that is where you want to follow Rob's post about the DiskArray object creation and the Update method of the job object itself.
Husband, Father, Solutions Architect, Geek | @DenverVMUG & @DenverPSUG leader | International Speaker | Veeam Vanguard | vExpert (PRO) | Cisco Champion
-
- Novice
- Posts: 7
- Liked: 1 time
- Joined: Apr 02, 2019 3:06 pm
- Full Name: theq
- Contact:
Re: How do I set DiskFilter and other exclude parameters
Thx for the fast answers.
As I understand, I have to add the vm to the disk exclusion list and then add the SCSI disks.
While adding the SCSI disks works fine, I have an issue adding the vm.
When I add the VM via
Add-VBRHvJobObject -Job $JobName -Entities (Find-VBRHvEntity -Name $VM)
the machine also appears in the list 'Virtual Machines to backup' - but the vm is already in the list via the Cluster, which should be backuped. The VM is also in the "disk exclusion" list. That is good, because I can add the disks to be excludes. When I add the VM via the VEEAM Console, the VM is not in the 'Virtual Machines to backup' list, but only in the "disk exclusion" list!
When I Remove the VM via
Get-VBRJobObject -Job $jobname -Name $vm | Remove-VBRJobObject
the VM is not longer in the "Virtual Machines to backup" list - and it is also moved from the "disk exclusion" list to the "VM exclusion" list. So it is no longer possible to add a disk.
So my questions are:
* What do I have to do, to have the VM only in the "disk exclusion" list like it would be via the console?
* What is the impact of the vm beeing listed in "Virtual Machines to backup"
tia
As I understand, I have to add the vm to the disk exclusion list and then add the SCSI disks.
While adding the SCSI disks works fine, I have an issue adding the vm.
When I add the VM via
Add-VBRHvJobObject -Job $JobName -Entities (Find-VBRHvEntity -Name $VM)
the machine also appears in the list 'Virtual Machines to backup' - but the vm is already in the list via the Cluster, which should be backuped. The VM is also in the "disk exclusion" list. That is good, because I can add the disks to be excludes. When I add the VM via the VEEAM Console, the VM is not in the 'Virtual Machines to backup' list, but only in the "disk exclusion" list!
When I Remove the VM via
Get-VBRJobObject -Job $jobname -Name $vm | Remove-VBRJobObject
the VM is not longer in the "Virtual Machines to backup" list - and it is also moved from the "disk exclusion" list to the "VM exclusion" list. So it is no longer possible to add a disk.
So my questions are:
* What do I have to do, to have the VM only in the "disk exclusion" list like it would be via the console?
* What is the impact of the vm beeing listed in "Virtual Machines to backup"
tia
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How do I set DiskFilter and other exclude parameters
Can you tell us whether you want to:
- Exclude a certain VM form processing
- Or exclude certain disk of certain VM from processing
Thanks!
- Exclude a certain VM form processing
- Or exclude certain disk of certain VM from processing
Thanks!
-
- Novice
- Posts: 7
- Liked: 1 time
- Joined: Apr 02, 2019 3:06 pm
- Full Name: theq
- Contact:
Re: How do I set DiskFilter and other exclude parameters
I want to exclude certain disk of certain VM from processing.
In the backup Job the vm is not listed directly, but only the Cluster the vm is in.
In the backup Job the vm is not listed directly, but only the Cluster the vm is in.
-
- Veteran
- Posts: 290
- Liked: 14 times
- Joined: Jan 08, 2019 6:04 am
- Contact:
Re: How do I set DiskFilter and other exclude parameters
One of our customers wants to create a backup job including system disk only or selected disk by PowerShell.
Is this possible?
I am not familiar with PowerShell.
I am also trying to find restore job with same rule.
Is this possible?
I am not familiar with PowerShell.
I am also trying to find restore job with same rule.
-
- Veeam Software
- Posts: 2013
- Liked: 671 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: How do I set DiskFilter and other exclude parameters
Hi
Since you cannot change Disk Filter Mode directly over a job object as it is a read-only property, you can configure your disk filter preferences
using one of these scripts shared earlier in this thread.
System disk usually corresponds to IDE (0:0) with the key "3000", so you would need to update disk filter options with "3000" to include system disk only.
As for a specific volume restore, I would advise to have a look at this thread.
Oleg
Since you cannot change Disk Filter Mode directly over a job object as it is a read-only property, you can configure your disk filter preferences
using one of these scripts shared earlier in this thread.
System disk usually corresponds to IDE (0:0) with the key "3000", so you would need to update disk filter options with "3000" to include system disk only.
As for a specific volume restore, I would advise to have a look at this thread.
Oleg
-
- Veteran
- Posts: 290
- Liked: 14 times
- Joined: Jan 08, 2019 6:04 am
- Contact:
Re: How do I set DiskFilter and other exclude parameters
Thank you very much!
I will tell this information to the customer.
I will tell this information to the customer.
-
- Veeam Software
- Posts: 119
- Liked: 3 times
- Joined: Feb 14, 2021 6:06 am
- Full Name: tomohiro yasuda
- Contact:
Re: How do I set DiskFilter and other exclude parameters
I want to use PowerShell to change the target disk for a backup job. I was asked the following question.
I want to use only the system disk. How to set "Disk0:0 only".
I looked at the following URL
This was how to add a disk with "select disk".
http://robvit.com/veeam/backup_replicat ... powershell
Is it possible to specify "Disk0:0 only"?
Also, is specifying $DKeys = "2000" or $DKeys = "3000" in the URL method the same result as "Disk0:0 only"?
I want to use only the system disk. How to set "Disk0:0 only".
I looked at the following URL
This was how to add a disk with "select disk".
http://robvit.com/veeam/backup_replicat ... powershell
Is it possible to specify "Disk0:0 only"?
Also, is specifying $DKeys = "2000" or $DKeys = "3000" in the URL method the same result as "Disk0:0 only"?
-
- Novice
- Posts: 9
- Liked: never
- Joined: Nov 02, 2022 5:55 am
- Contact:
Re: How do I set DiskFilter and other exclude parameters
Sorry for raising the topic again, it seems still actual since 14 years after it was started =)
I have backup job with VM FOLDER specified as a target. I need to modify it to set the exclusion to process DISK 0:0 only (can be done via GUI).
Can't manage to achieve it using none of the above suggestions.
Any help please?
I have backup job with VM FOLDER specified as a target. I need to modify it to set the exclusion to process DISK 0:0 only (can be done via GUI).
Can't manage to achieve it using none of the above suggestions.
Any help please?
-
- Veeam Software
- Posts: 2245
- Liked: 544 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: How do I set DiskFilter and other exclude parameters
Hi AlexeyG,
Can I ask you to check the links in Oleg's post here and see if those work for you? Right now there is not an official endpoint for this, but I believe the above should still work. Please note that such methods are unsupported, but in this case should still work.
Similarly, consider using the Veeam Backup and Replication restAPI, as the create/edit jobs allows for disk inclusion/exclusion, and mimics the UI more closely in available options.
Thanks!
Can I ask you to check the links in Oleg's post here and see if those work for you? Right now there is not an official endpoint for this, but I believe the above should still work. Please note that such methods are unsupported, but in this case should still work.
Similarly, consider using the Veeam Backup and Replication restAPI, as the create/edit jobs allows for disk inclusion/exclusion, and mimics the UI more closely in available options.
Thanks!
David Domask | Product Management: Principal Analyst
-
- Enthusiast
- Posts: 88
- Liked: 8 times
- Joined: Oct 13, 2020 1:40 pm
- Full Name: Leo
- Contact:
Except ‘D’ Drive we want to take the Veeam Backup via Powershell
Hi Experts
We have raised a case, below is the ID. But they havent shared the relevant link.
Case # 07485807
We want to take the Veeam Backup Except ‘D’ Drive via Powershell. I am not able to find the exact command in Veeam page. I have a PowerShell script to take the Veeam backup, In the same code I want to ignore the drive and take the Veeam backup. I am attaching the code below. Can you please help me to add the code for D drive exception part in my below script. Below are the steps we are looking forward to add
1)Click on ‘Exclusions’ and select the Drives except ‘D
2) Click selected disks and In VC level, C Drive is SCSI (0:0), when this option is selected, only the ‘C’ drive will
be backed up excluding ‘D’ and Tick mark the excluded disks from the VM configuration.
I am looking forward to hearing from you.
We have raised a case, below is the ID. But they havent shared the relevant link.
Case # 07485807
We want to take the Veeam Backup Except ‘D’ Drive via Powershell. I am not able to find the exact command in Veeam page. I have a PowerShell script to take the Veeam backup, In the same code I want to ignore the drive and take the Veeam backup. I am attaching the code below. Can you please help me to add the code for D drive exception part in my below script. Below are the steps we are looking forward to add
1)Click on ‘Exclusions’ and select the Drives except ‘D
2) Click selected disks and In VC level, C Drive is SCSI (0:0), when this option is selected, only the ‘C’ drive will
be backed up excluding ‘D’ and Tick mark the excluded disks from the VM configuration.
I am looking forward to hearing from you.
Code: Select all
$BackupJobName = "$($IMSSiteID)_Production"
$PlainPassword = Read-Host -assecurestring "`nEnter the cryptic password for encryption (please remember this password, since this cannot be restored once it is lost) :"
$SecurePassword = $PlainPassword | ConvertTo-SecureString -AsPlainText -Force
$Key = Add-VBREncryptionKey -Password $SecurePassword -Description "Veeam Administrator"
$Entity = Find-VBRViEntity -VMsAndTemplates -name *ISP* | Where {$_.Name -NotMatch "TST"}
$repository = Get-VBRBackupRepository
$BRepoName = ($($repository.name)).split(',')
$BRlength = $BRepoName.length
Write-host "Number of Backup Repository found is '$BRlength'"
#Write-host "your Virtual Lab is '$($Vlab.name)'"
for ($i=0;$i -le $BRlength-1; $i++)
{
write-host " $($i+1). $($BRepoName[$i])"
}
$in = Read-host "`n`nplease select Backup Repository"
while($in -gt $BRlength)
{
$in = Read-host "Please select correct Backup Repository name:"
}
$in = $in - 1
$repository = Get-VBRBackupRepository -name $BRepoName[$in]
Add-VBRViBackupJob -Name $BackupJobName -Entity $Entity -BackupRepository $repository
$job = Get-VBRJob -Name $BackupJobName
$options = $job.GetOptions()
$options.BackupStorageOptions.RetainCycles = 8
Set-VBRJobOptions -Job $job -Options $options
Get-VBRJob -Name $BackupJobName | Set-VBRJobAdvancedStorageOptions -CompressionLevel 5 -EnableDeduplication $True -StorageBlockSize 3
$Options=$job.getoptions()
$Options.GenerationPolicy.RecheckScheduleKind = "Monthly"
$Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayOfWeek = "Sunday"
$Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayNumberInMonth = "Last"
$Options.GenerationPolicy.EnableRechek = $true
Set-VBRJobAdvancedStorageOptions -Job $job -EnableEncryption $true -EncryptionKey $Key
Get-VBRJob -Name $BackupJobName | Set-VBRJobOptions -Options $Options
Get-VBRJob -Name $BackupJobName | Set-VBRJobAdvancedBackupOptions -Algorithm Incremental -TransformFullToSyntethic $False -EnableFullBackup $False -FullBackupDays Sunday
Get-VBRJob -Name $BackupJobName | Disable-VBRJobSchedule
Get-VBRJob -Name $BackupJobName | Disable-VBRJob
Who is online
Users browsing this forum: No registered users and 10 guests