Removing a single restorepoint

PowerShell script exchange

Removing a single restorepoint

Veeam Logoby tomas.odehnal » Tue Mar 18, 2014 6:37 am

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.
tomas.odehnal
Influencer
 
Posts: 14
Liked: 2 times
Joined: Tue Oct 02, 2012 11:34 am
Full Name: Tomas Odehnal

Re: Removing a single restorepoint

Veeam Logoby v.Eremin » Tue Mar 18, 2014 9:09 am

Hi, Tomas,

Can you provide the whole script body, please?

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

Re: Removing a single restorepoint

Veeam Logoby tomas.odehnal » Tue Mar 18, 2014 9:43 am

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: 14
Liked: 2 times
Joined: Tue Oct 02, 2012 11:34 am
Full Name: Tomas Odehnal

Re: Removing a single restorepoint

Veeam Logoby tomas.odehnal » Wed Mar 19, 2014 3:14 pm

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?
tomas.odehnal
Influencer
 
Posts: 14
Liked: 2 times
Joined: Tue Oct 02, 2012 11:34 am
Full Name: Tomas Odehnal

Re: Removing a single restorepoint

Veeam Logoby v.Eremin » Thu Mar 20, 2014 8:13 am

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.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Removing a single restorepoint

Veeam Logoby tomas.odehnal » Thu Mar 20, 2014 9:37 am

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.
tomas.odehnal
Influencer
 
Posts: 14
Liked: 2 times
Joined: Tue Oct 02, 2012 11:34 am
Full Name: Tomas Odehnal

Re: Removing a single restorepoint

Veeam Logoby v.Eremin » Mon Mar 24, 2014 8:25 am

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.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Removing a single restorepoint

Veeam Logoby tomas.odehnal » Mon Mar 24, 2014 8:27 am

Thanks for the response.
tomas.odehnal
Influencer
 
Posts: 14
Liked: 2 times
Joined: Tue Oct 02, 2012 11:34 am
Full Name: Tomas Odehnal

Re: Removing a single restorepoint

Veeam Logoby v.Eremin » Mon Mar 24, 2014 8:29 am

You're welcome. Feel free to contact us, if any other help is needed. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
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: Exabot [Bot] and 5 guests