Another post about my favorite feature in v11: Hardened Repository. This time it is about the ability to change the expiration date of already immutable restore points. Veeam made this possible by using PowerShell. The corresponding command is: Set-VBRImmutabilityLockExpirationDate
. This post is about how to use it.
Select the restore point you want to change immutability expiration date. To show all restore points of a specific VM in a job you can run for example:Get-VBRRestorePoint -Backup immu_job_01 -Name VM02
![](https://uploads-eu-west-1.insided.com/veeam-en/attachment/7926c5fa-7fc9-4c57-ba74-8cd14f24d282.png)
Here backup job name is Immu_Job_01 and VM is called VM02. I will change the date for the first - the oldest - restore point in the list. To work with it I save it in $RestorePoint:
$RestorePoint = (Get-VBRRestorePoint -Backup immu_job_01 -Name VM02))0]
Show the current expiration date by running this command: $RestorePoint.getstorage().ImmutableTillUtc
![](https://uploads-eu-west-1.insided.com/veeam-en/attachment/85cc5347-9996-4c65-9c31-688d1783b04a.png)
We see, current ImmutableTilldate is 1st October 2021. In my example I change the date to the end of 2030:
$ExpDate = Get-Date -Year 2030 -Month 12 -Day 31
Set-VBRImmutabilityLockExpirationDate -RestorePoint $RestorePoint -ExpirationDate $ExpDate
![](https://uploads-eu-west-1.insided.com/veeam-en/attachment/ae77e246-6916-4a5b-9276-34f582ac4619.png)
Really simple, isn't it? When you are happy with it you can stop reading. If you now ask yourself whether this does destroy the entire immutability, read on.
What happens when the bad guy runs this command. For example:
Set-VBRImmutabilityLockExpirationDate -RestorePoint $RestorePoint -ExpirationDate $(Get-Date)
Good news: the guy will see this:
![](https://uploads-eu-west-1.insided.com/veeam-en/attachment/1c03f870-3f62-4ab0-b108-313210f473d0.png)
Okay, does not work! One reason for this: in v11 it is not possible to shorten the immutability period of a restore point. But: this is possible in v11a! It is still not possible to set any date before the current set. But you can reset to original date:
Set-VBRImmutabilityLockExpirationDate -RestorePoint $RestorePoint -ToOriginal
![](https://uploads-eu-west-1.insided.com/veeam-en/attachment/99f52adc-5332-4df6-a92e-74edc1e9fc7d.png)
(Note: I changed restore point t1] after the update to v11a)
If original date already passed, it will be reset to current date + immutable period of repository. So, to shorten the period changed before, go to original date and change to new desired date.
See my blog post for more details! It includes some details of description file on Linux.