PowerShell script exchange
Post Reply
mschlott
Enthusiast
Posts: 85
Liked: 2 times
Joined: Jan 20, 2011 5:45 pm
Full Name: Mike Schlottman
Contact:

Selecting a restore point

Post by mschlott »

I have about 5000 files that need to be restored in a text document. I have never used Veeam from PowerShell before and am a PowerShell neophyte.

First is there any way I can restore all the files listed in a text document without using powershell? I am assuming not.

Per the Veeam B&R powershell reference guide I can use Start-VBRRestoreVMFiles for this. The following example is given.

Start-VBRRestoreVMFiles –RestorePoint $point –Server $host –Path “C:\BackupFiles”

I know how to get the $host for this, but how do I get a restore point other than the first or last one.

get-vbrrestorepoint -backup (Get-VBRbackup -name "MYBACKUPJOB") -name MYVMNAME

I can use the above command to get a list of restore points and use select to get the last one. How do I get one from a specific date. The one I want looks like this.

MYVMNAME 11/19/2013 8:04:57 PM Increment False

Also, if I exclude the -Path variable, will the files restore to their original location?
mschlott
Enthusiast
Posts: 85
Liked: 2 times
Joined: Jan 20, 2011 5:45 pm
Full Name: Mike Schlottman
Contact:

Re: Selecting a restore point

Post by mschlott »

I found a way to do this, but if someone has a better way let me know.

get-vbrrestorepoint -backup (Get-VBRbackup -name "MYBACKUPJOB") -name MYVMNAME | select -last 14 | select -first 1
veremin
Product Manager
Posts: 20283
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Selecting a restore point

Post by veremin »

Hi, Mike,

In fact, each Restore Point has parameter called CreationTime which can be used in order to distinguish restore points. So, the following script should do the trick:

Code: Select all

asnp VeeamPSSnapin
$Backup = Get-VBRBackup -Name "MYBACKUPJOB"
$Backup | Get-VBRRestorePoint -name "MYVMNAME" | where {$_.CreationTime -eq "11/19/2013 8:04:57"}
Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests