Skip to main content

Hi guys,

 

I was wondering if it is possible to enable the encrypt option for all backup jobs using powershell. I already have created the encryption key/password. 

 

Your help would be appriciated.

 

Hello,

 

This can be accomplished using the Set-VBRJobAdvancedStorageOptions cmdlet.

 

Prior to this change, I also recommend you read our documentation where it discusses this change in more detail:

 

https://helpcenter.veeam.com/docs/backup/vsphere/encryption_best_practices.html#encryption-for-existing-jobs


Please be aware that a new full backup is needed for all systems you activate encryption for. This can result in a huge amount of additional backup data.


Please be aware that a new full backup is needed for all systems you activate encryption for. This can result in a huge amount of additional backup data.

Came here to say this, this will be an active full, so if you’re using ReFS/XFS you won’t be benefiting from block cloning as efficiently until all of your old chains are replaced by the new chains.

I actually did a session on this with Rick Vanover a few weeks ago if it’s of interest:

 


Please be aware that a new full backup is needed for all systems you activate encryption for. This can result in a huge amount of additional backup data.

Came here to say this, this will be an active full, so if you’re using ReFS/XFS you won’t be benefiting from block cloning as efficiently until all of your old chains are replaced by the new chains.

I actually did a session on this with Rick Vanover a few weeks ago if it’s of interest:

 

Correct, I forgot to mention the active full and the consequences for ReFS/XFS. :sunglasses: Good that the whole community have a look at this.


Just an update,

 

I created a script to enable the encryption. I wanted to share with you guys

 

Disconnect-VBRServer
Connect-VBRServer -Server localhost

function Read-InputBoxDialog(gstring]$Message, ,string]$WindowTitle, ,string]$DefaultText)
{
    Add-Type -AssemblyName Microsoft.VisualBasic
    return eMicrosoft.VisualBasic.Interaction]::InputBox($Message, $WindowTitle, $DefaultText)
}

$ekey = Get-VBREncryptionKey -Description "Name of the Encryption Key that you configured"

$jobname = Read-InputBoxDialog -Message "Please enter job name to enable encryption" -WindowTitle "Which Job"

$job = Get-VBRJob -Name $jobname
Set-VBRJobAdvancedStorageOptions -Job $job -EnableEncryption $True -EncryptionKey $ekey


Just an update,

 

I created a script to enable the encryption. I wanted to share with you guys

 

Disconnect-VBRServer
Connect-VBRServer -Server localhost

function Read-InputBoxDialog(gstring]$Message, ,string]$WindowTitle, ,string]$DefaultText)
{
    Add-Type -AssemblyName Microsoft.VisualBasic
    return eMicrosoft.VisualBasic.Interaction]::InputBox($Message, $WindowTitle, $DefaultText)
}

$ekey = Get-VBREncryptionKey -Description "Name of the Encryption Key that you configured"

$jobname = Read-InputBoxDialog -Message "Please enter job name to enable encryption" -WindowTitle "Which Job"

$job = Get-VBRJob -Name $jobname
Set-VBRJobAdvancedStorageOptions -Job $job -EnableEncryption $True -EncryptionKey $ekey

Good work on the script, again I’d just echo that you’ve factored in the amount of time it’ll take to perform active full backups on all of your jobs and that you’ve got sufficient repository space is you carry this out on all jobs simultaneously, but this is certainly a fast way to achieve this.


Good work on the script, again I’d just echo that you’ve factored in the amount of time it’ll take to perform active full backups on all of your jobs and that you’ve got sufficient repository space is you carry this out on all jobs simultaneously, but this is certainly a fast way to achieve this.

You don’t have to enable encryption on all jobs at the same time.

So the active fulls are done at different days and it’s not that bad. :sunglasses:


Thank you for the script. Works great. Made a few changes to perform a bulk update.


Wow, this is great, thank you @ldasilva for sharing the great script.


Handy script, but if anyone is reading it be warned if your jobs all run the same day they will ALL do an active full and take up a lot of space. 

 

If your jobs are small, or you have lots of room this would be great. For myself I’ll do 1 here and there to not overload my repo. 


Comment