PowerShell script exchange
Post Reply
JamesHartley
Lurker
Posts: 1
Liked: never
Joined: Oct 04, 2011 2:03 pm
Full Name: James Hartley
Contact:

File level restore via powershell??

Post by JamesHartley »

Hi,

Does anyone know if you can restore certain files from a backup, via powershell?
I have run the backup job and restored the whole server via powershell, but can't seem to work out how you would just restore a certain file.

Any help would be appreciated.

Thanks
James
Vitaliy S.
VP, Product Management
Posts: 27377
Liked: 2800 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: File level restore via powershell??

Post by Vitaliy S. »

Hello James,

You should be using this PowerShell cmdlet to restore individual Windows Guest files:

Code: Select all

Start-VBRWindowsFileRestore
Hope this helps!
jlsung
Influencer
Posts: 21
Liked: never
Joined: Sep 15, 2011 1:41 pm
Contact:

Re: File level restore via powershell??

Post by jlsung »

Hi,

There is no cmdlet for a Guest OS FLR ?
Vitaliy S.
VP, Product Management
Posts: 27377
Liked: 2800 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: File level restore via powershell??

Post by Vitaliy S. »

Do you possibly mean "Other OS" FLR cmdlet? If this is the case, then, unfortunately, it is not available at the moment.
AdrianHinton
Enthusiast
Posts: 71
Liked: 6 times
Joined: Apr 07, 2014 10:00 am
Full Name: Adrian Hinton
Contact:

Re: File level restore via powershell??

Post by AdrianHinton »

Hi,

How can I restore a file using the Start-VBRWindowsFileRestore cmdlet? When I look at the drives after I have the session in a variable this is what I see: C:\VeeamFLR\SERVER\Volume0, C:\VeeamFLR\SERVER\Volume1, C:\VeeamFLR\SERVER\Volume2. And I cannot access the mounted drive.
AdrianHinton
Enthusiast
Posts: 71
Liked: 6 times
Joined: Apr 07, 2014 10:00 am
Full Name: Adrian Hinton
Contact:

Re: File level restore via powershell??

Post by AdrianHinton »

I think I'm getting there:

Dir $WFLR.MountSession.MountedDevices.DriveLetter[0]
AdrianHinton
Enthusiast
Posts: 71
Liked: 6 times
Joined: Apr 07, 2014 10:00 am
Full Name: Adrian Hinton
Contact:

Re: File level restore via powershell??

Post by AdrianHinton »

Sorry for the Spam.. I will work out the rest later for myself but I have answered my question.

$WFLR = $null

$WFLR = Get-VBRBackup -Name "Backup-Job" | Get-VBRRestorePoint |
Sort CreationTime -Descending | Select -First 1 | Start-VBRWindowsFileRestore

$WFLR.MountSession.MountedDevices.mountpoint | % {

GCI -Path $_

}

Stop-VBRWindowsFileRestore $WFLR

The above will list the contents of the root directories of the VM's drives and the GCI command in the foreach loop can be modified to perform the finding and copying of the test files. And the files are located by default at C:\VeeamFLR\SERVERNAME\Volume(n) etc.. on the VBR server.

Thank you :)
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: File level restore via powershell??

Post by veremin »

Hi Andrian, we have some examples of using file level restore via PS in the adjacent thread; might be worth reviewing. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests