Start-VBRWindowsFileRestore

PowerShell script exchange

Start-VBRWindowsFileRestore

Veeam Logoby omorin » Fri Nov 26, 2010 10:45 am

Bonjour,

I search a script using Start-VBRWindowsFileRestore.
I want to copy a file, in fact my exchange files priv1.edb from my Veeam backup to a nas.

Any example ?

:wink:
omorin
Enthusiast
 
Posts: 35
Liked: 3 times
Joined: Tue Oct 19, 2010 1:37 pm
Location: Bergerac, France
Full Name: olivier morin

Re: Start-VBRWindowsFileRestore

Veeam Logoby omorin » Fri Nov 26, 2010 4:16 pm

Bonsoir,

The help given by get-help Start-VBRWindowsFileRestore is wrong, it talks about restoring vm (.vmdk,...) files but not files inside the windows machine.

Confusing...

I think the help file is not correct.

:cry:
omorin
Enthusiast
 
Posts: 35
Liked: 3 times
Joined: Tue Oct 19, 2010 1:37 pm
Location: Bergerac, France
Full Name: olivier morin

Re: Start-VBRWindowsFileRestore

Veeam Logoby Vitaliy S. » Mon Nov 29, 2010 3:25 pm

Hello Olivier,

The help information is correct. The restore procedure is similar to restoring VM files, though there are slight differences. For example if you need to restore readme.txt file located on the drive C on the root folder, you should use the syntax below:

Code: Select all
$result = Get-VBRBackup | where {$_.JobName -eq "Backup Job 1"} | Get-VBRRestorePoint | sort CreationTime -Descending | select -First 1 | Start-VBRWindowsFileRestore
$file = $result.FirstDrive + “:\readme.txt”
Copy $file c:\
Stop-VBRWindowsFileRestore

Hope it helps!
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Start-VBRWindowsFileRestore

Veeam Logoby omorin » Tue Dec 28, 2010 11:01 am

This script is OK, a ":" is missing in $file = $result.FirstDrive + “\readme.txt”, the good yntax is $file = $result.FirstDrive + “:\readme.txt”

And you have to close the job with Stop-VBRWindowsFileRestore
omorin
Enthusiast
 
Posts: 35
Liked: 3 times
Joined: Tue Oct 19, 2010 1:37 pm
Location: Bergerac, France
Full Name: olivier morin

Re: Start-VBRWindowsFileRestore

Veeam Logoby Vitaliy S. » Tue Dec 28, 2010 1:23 pm

Olivier, thanks for getting back and posting an update, much appreciated. I've adjusted the script above with your comments.
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Start-VBRWindowsFileRestore

Veeam Logoby omorin » Tue Dec 28, 2010 3:07 pm

Ouh !

I had to reboot my Veeam server because of virtual-disk error...
I think that Stop-VBRWindowsFileRestore is not enough, or needs parameters...
omorin
Enthusiast
 
Posts: 35
Liked: 3 times
Joined: Tue Oct 19, 2010 1:37 pm
Location: Bergerac, France
Full Name: olivier morin

Re: Start-VBRWindowsFileRestore

Veeam Logoby michaelschad » Wed Feb 23, 2011 6:44 am

Hello,
I have the same problem as omorin, the backup file is not closed after dismounting with Stop-VBRWindowsFileRestore. Have anyone a solution ?
michaelschad
Lurker
 
Posts: 1
Liked: never
Joined: Fri Jul 10, 2009 4:37 pm
Full Name: MIchael Schad

Re: Start-VBRWindowsFileRestore

Veeam Logoby Vitaliy S. » Thu Feb 24, 2011 10:36 am

Hello Michael,

Could you please shoot your log files to our support team as it is not expected bahviour. Besides, I would appreicate if you could send me your ticket number, so I could update this topic with the resolution later on.

Thank you!
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Start-VBRWindowsFileRestore

Veeam Logoby omorin » Mon Feb 28, 2011 1:52 pm

Still no solution ?
omorin
Enthusiast
 
Posts: 35
Liked: 3 times
Joined: Tue Oct 19, 2010 1:37 pm
Location: Bergerac, France
Full Name: olivier morin

Re: Start-VBRWindowsFileRestore

Veeam Logoby Vitaliy S. » Mon Feb 28, 2011 1:58 pm

Olivier, I haven't seen Michael opening a support case with our technical team, so I cannot update this topic with possible resolution. I would appreciate if you could contact our support guys and investigate this issue together, as we cannot reproduce it in our labs.
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Start-VBRWindowsFileRestore

Veeam Logoby omorin » Tue Mar 08, 2011 10:48 am

Hi,
The virtual disk is visible in the file explorer, the file is correctly copied.
It seems that Stop-VBRWindowsFileRestore does not close the virtual dirves...

System events are (sorry in French):

3/8/201111:46:042257VirtualDKN/AHDV-SAUVEGARDE\Device\Virt
3/8/201111:46:254026Application PopupN/AHDV-SAUVEGARDEWindows - L'écriture différée a échoué Windows n'a pas pu enregistrer les données du fichier \Device\VirtualDiskVolume1\$MftMirr. Les données ont été perdues. Cette erreur peut être due à une panne de votre matériel ou de votre connexion réseau. Essayez d'enregistrer ce fichier à un autre emplacement.

I have to reboot teh machine.
omorin
Enthusiast
 
Posts: 35
Liked: 3 times
Joined: Tue Oct 19, 2010 1:37 pm
Location: Bergerac, France
Full Name: olivier morin

Re: Start-VBRWindowsFileRestore

Veeam Logoby Gostev » Tue Mar 08, 2011 12:03 pm

Hello, please open a support case to let us investigate this behavior more closely. Thanks!
Gostev
Veeam Software
 
Posts: 21390
Liked: 2349 times
Joined: Sun Jan 01, 2006 1:01 am
Location: Baar, Switzerland

Re: Start-VBRWindowsFileRestore

Veeam Logoby sccit » Mon Jul 29, 2013 12:36 pm

Dear all,

is there any follow up on this topic ?
we have the exact same issue : veeam transport service keeps a lock on the files and when reviewing the log files, the mount log files says "waiting for next command" as last action.
it seems the stop-VBRWindowsFileRestore does nothing

as a side note, the powershell help for this command suggest you can specify as an optional parameter the mount point to close, but how do one find this mount point reference using powershell commands ?

tx
sccit
Lurker
 
Posts: 2
Liked: never
Joined: Mon Jul 29, 2013 12:33 pm

Re: Start-VBRWindowsFileRestore

Veeam Logoby v.Eremin » Mon Jul 29, 2013 2:08 pm

It seems that the code provided above missed a required line – Stop-VBRWindowsFileRestore command should be pointed to an [FileRestore] object ($Result, in other words). So, the last line should be:

Code: Select all
Stop-VBRWindowsFileRestore $Result


As to finding a restore point, it can be done using the following script, that will get a latest restore point of a given VM within a specified job:

Code: Select all
Get-VBRBackup | where {$_.jobname -eq "Name of your job"} | Get-VBRRestorePoint | where {$_.name -eq "Name of your VM"} | Sort-Object creationtime -Descending | Select-Object -First 1


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

Re: Start-VBRWindowsFileRestore

Veeam Logoby sccit » Mon Jul 29, 2013 2:36 pm

Hi Vladimir,

Tx for the much needed update on this thread, your tips solved the issue, I can now see in the logs the post-restore cleanup performed.
Globally the powershell command set lacks examples, if you ask for detailed help that should include samples, you only get the command syntax.
More sample scripts from Veeam would make an even better product !

Many thanks for the swift reply
sccit
Lurker
 
Posts: 2
Liked: never
Joined: Mon Jul 29, 2013 12:33 pm

Next

Return to PowerShell



Who is online

Users browsing this forum: No registered users and 4 guests