How to set "Storage Optimizations" Advanced Settings with PS

PowerShell script exchange

How to set "Storage Optimizations" Advanced Settings with PS

Veeam Logoby juacosta » Sun May 05, 2013 3:36 pm

Can you help with some information on how to set the "Storage Optimization" to "LAN target" using the Power Shell Commandlets in Veeam Backup.

I am able to set all the settings bellow but not the Optinization

#Set Backup Job Options
$JobNameObjectOptions = $JobNameObject.GetOptions()
#$JobNameObjectOptions.BackupStorageOptions.Optimizations = "LAN target"
$JobNameObjectOptions.BackupStorageOptions.RetainCycles = $RetainCyclesadd
$JobNameObjectOptions.JobOptions.SourceProxyAutoDetect = $SourceProxyAutoDetectadd
$JobNameObjectOptions.BackupStorageOptions.RetainDays = $RetainDaysadd
$JobNameObjectOptions.BackupTargetOptions.Algorithm = $Algorithmadd
juacosta
Novice
 
Posts: 6
Liked: never
Joined: Sun May 05, 2013 2:00 pm
Full Name: Juan Ramon Acosta

Re: How to set "Storage Optimizations" Advanced Settings wit

Veeam Logoby v.Eremin » Mon May 06, 2013 7:36 am 3 people like this post

You’re unable to set these options because .BackupStorageOptions.Optimizations doesn’t even exist.

In order to set “Lan Target” in Storage optimization settings the following script needs to be implemented:

Code: Select all
asnp VeeamPSSnapin
$Job = Get-VBRJob -name "Name of your Job"
$OptionsToSet = $Job.GetOptions()
$OptionsToSet.BackupStorageOptions.StgBlockSize = "KbBlockSize512"
$Job.SetOptions($OptionsToSet)


Additionally, if you’re willing to set “Local Target (16TB+)”, then replace “KbBlockSize512” with “KbBlockSize8192”. In case of “Local Target” with “KbBlockSize1024”. Finally, in case of “WAN Target” with “KbBlockSize256”.

Hope this helps.
Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: How to set "Storage Optimizations" Advanced Settings wit

Veeam Logoby tsightler » Mon May 06, 2013 12:14 pm 1 person likes this post

v.Eremin wrote:Additionally, if you’re willing to set “Local Target (16TB+)”, then replace “KbBlockSize512” with “KbBlockSize8192”. In case of “Local Target” with “KbBlockSize1024”. Finally, in case of “WAN Target” with “KbBlockSize512”.


I believe you have a small error/typo, "WAN Target" is "KbBlockSize256".
tsightler
Veeam Software
 
Posts: 4767
Liked: 1737 times
Joined: Fri Jun 05, 2009 12:57 pm
Full Name: Tom Sightler

Re: How to set "Storage Optimizations" Advanced Settings wit

Veeam Logoby juacosta » Mon May 06, 2013 12:30 pm

v.Eremin & tsighter, thanks a lot for the help this works very well
juacosta
Novice
 
Posts: 6
Liked: never
Joined: Sun May 05, 2013 2:00 pm
Full Name: Juan Ramon Acosta

Re: How to set "Storage Optimizations" Advanced Settings wit

Veeam Logoby v.Eremin » Mon May 06, 2013 12:38 pm 1 person likes this post

I believe you have a small error/typo, "WAN Target" is "KbBlockSize256".

Yep, a typo, indeed. Copy/Paste as its worst.

Have already fixed it.

Thanks for correcting me.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 7 guests