PowerShell script exchange
Post Reply
tomas.odehnal
Influencer
Posts: 16
Liked: 2 times
Joined: Oct 02, 2012 11:34 am
Full Name: Tomas Odehnal
Contact:

Removing a single restorepoint

Post by tomas.odehnal »

Hello,

please can anyone confirm the behavior of Remove-VBRRestorePoint command? I was playing with that command today - I selected restore points of one VM to a variable $a by Get-VBRBackupRestorePoint command, then referenced the first one by $a[0] (oldest vrb) and ran a Remove-VBRRestorePoint command on it. The command removed whole backup chain and not just that referenced restore point. Was it supposed to do that?

Thanks
T.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Removing a single restorepoint

Post by veremin »

Hi, Tomas,

Can you provide the whole script body, please?

Thanks.
tomas.odehnal
Influencer
Posts: 16
Liked: 2 times
Joined: Oct 02, 2012 11:34 am
Full Name: Tomas Odehnal
Contact:

Re: Removing a single restorepoint

Post by tomas.odehnal »

Hello Vladimir,

the script was simple:

Code: Select all

$a = get-vbrbackup -name vmname | get-vbrrestorepoint
$a[0] | Remove-VBRRestorePoint
Before running the second line I checked $a[0] references the correct restorepoint.
tomas.odehnal
Influencer
Posts: 16
Liked: 2 times
Joined: Oct 02, 2012 11:34 am
Full Name: Tomas Odehnal
Contact:

Re: Removing a single restorepoint

Post by tomas.odehnal »

I tried the command in another environment (also v7) and it behave the same. I also tried referencing specific restore point by oid and whole chain was deleted too.
In the corresponding section of Veeam Powershell User Guide I found examples, which refer to removal of specific check points. Am I the only one who tried this command? :) Or am I using wrong syntax to reference the restore point?
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Removing a single restorepoint

Post by veremin »

Hi, Tomas,

I've just tried the said commandlet in my environment. Everything worked in the exact way you described. Most likely, this command emulates the GUI functionality. It's not possible to delete specific restore point, using GUI, and the situation is the same with PS.

So, if you want to control the number of restore points kept on disk, the best option will be to use retention policy, rather than custom scripts.

As to the documentation, it seems to provide the wrong example.

Thanks.
tomas.odehnal
Influencer
Posts: 16
Liked: 2 times
Joined: Oct 02, 2012 11:34 am
Full Name: Tomas Odehnal
Contact:

Re: Removing a single restorepoint

Post by tomas.odehnal »

Hello Vladimir,

so there is no difference between Remove-VBRBackup and Remove-VBRRestorePoint?
Are there any plans to implement removal of specific restore point? I know this could be possibly problematic. What I was looking for exactly was "enforcing" the restore points limit and deleting unneeded restore points without actually running the backup job.

Thanks.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Removing a single restorepoint

Post by veremin »

So there is no difference between Remove-VBRBackup and Remove-VBRRestorePoint?
The difference is that using Remove-VBRBackup it's possible to remove backups from GUI only and leave them on disk in the meantime.
Are there any plans to implement removal of specific restore point? I know this could be possibly problematic. What I was looking for exactly was "enforcing" the restore points limit and deleting unneeded restore points without actually running the backup job.
For now there are no plans to implement these settings either in GUI or in PS.

Thanks.
tomas.odehnal
Influencer
Posts: 16
Liked: 2 times
Joined: Oct 02, 2012 11:34 am
Full Name: Tomas Odehnal
Contact:

Re: Removing a single restorepoint

Post by tomas.odehnal »

Thanks for the response.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Removing a single restorepoint

Post by veremin »

You're welcome. Feel free to contact us, if any other help is needed. Thanks.
Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 20 guests