-
- Enthusiast
- Posts: 26
- Liked: never
- Joined: May 02, 2011 8:35 pm
- Contact:
Windows File Level Restore
I am trying to write a Powershell script that will restore a test file from my VMs in my Veeam Backups (running Veeam v6.0). If I'm reading correctly I need to use the start-vbrwindowsfilerestore cmdlet. However, when I try to restore a file I get a message "Cannot find path". I verified that the file I am restoring is in the path I specified. I also verified that the file is on the backups using the restore option in both the "Backup & Replication" console as well as the "Enterprise Manager" console.
What am I doing wrong?
Here's the script code I'm running:
$result = Get-VBRBackup | where {$_.JobName -eq "Backup_My_Servers"} | Get-VBRRestorePoint | sort CreationTime -Descending | where {$_.VMName -eq "ServerA"} | select -First 1 | Start-VBRWindowsFileRestore
$file = "c:\readme.txt”
Copy $file "E:\Special Restores\"
Stop-VBRWindowsFileRestore
What am I doing wrong?
Here's the script code I'm running:
$result = Get-VBRBackup | where {$_.JobName -eq "Backup_My_Servers"} | Get-VBRRestorePoint | sort CreationTime -Descending | where {$_.VMName -eq "ServerA"} | select -First 1 | Start-VBRWindowsFileRestore
$file = "c:\readme.txt”
Copy $file "E:\Special Restores\"
Stop-VBRWindowsFileRestore
-
- Veteran
- Posts: 293
- Liked: 19 times
- Joined: Apr 13, 2011 12:45 pm
- Full Name: Thomas McConnell
- Contact:
Re: Updated below
Try this out
I suppose if the VM has multiple drives then you'll want to tweak it a little
Code: Select all
$WFLR = Get-VBRBackup -Name "Job Name" | Get-VBRRestorePoint -Name "vm.lab.local" |
Sort CreationTime -Descending | Select -First 1 | Start-VBRWindowsFileRestore
Copy "$($WFLR.Drives)\readme.txt" "E:\Special Restores\"
Stop-VBRWindowsFileRestore
-
- Enthusiast
- Posts: 26
- Liked: never
- Joined: May 02, 2011 8:35 pm
- Contact:
Re: Windows File Level Restore
Doesn't like the $WFLR.Drives option. My test file is c:\testfile.vbs but it looks for the file in C:\Users\...\Veeam.Backup.Powershell.Model.FileRestore.Drives\testfile.vbs.
-
- Veteran
- Posts: 293
- Liked: 19 times
- Joined: Apr 13, 2011 12:45 pm
- Full Name: Thomas McConnell
- Contact:
Re: Windows File Level Restore
Change it to
It mounts it into a really long path for some reason i.e
or whatever the alternative is for 2008
Code: Select all
"$($WFLR.Drives)\testfile.vbs"
Code: Select all
C:\Documents and Settings\Administrator.lab\Local Settings\Temp\1\scnrximq.54e
-
- Enthusiast
- Posts: 26
- Liked: never
- Joined: May 02, 2011 8:35 pm
- Contact:
Re: Windows File Level Restore
That gave me a wierd error...
Failed to initialize log [C:\ProgramData\Veeam\Backup\Aux.VeeamProxyClient.log].
Incorrect function
Seek operation has failed. File: [C:\ProgramData\Veeam\Backup\Aux.VeeamProxyClie
nt.log]. Distance to move: [0]. Move method: [FILE_END].
Failed to initialize log [C:\ProgramData\Veeam\Backup\Aux.VeeamProxyClient.log].
Incorrect function
Seek operation has failed. File: [C:\ProgramData\Veeam\Backup\Aux.VeeamProxyClie
nt.log]. Distance to move: [0]. Move method: [FILE_END].
-
- Veteran
- Posts: 293
- Liked: 19 times
- Joined: Apr 13, 2011 12:45 pm
- Full Name: Thomas McConnell
- Contact:
Re: Windows File Level Restore
Lets try it a little different again
Can you confirm that the VM this backup is for only has one drive attached to it?
Code: Select all
cd $WFLR.Drives
Copy "readme.txt" "E:\Special Restores\"
-
- Enthusiast
- Posts: 26
- Liked: never
- Joined: May 02, 2011 8:35 pm
- Contact:
Re: Windows File Level Restore
It has more than one drive but only one is backed up via Veeam at this time (because of space constraints).
-
- Enthusiast
- Posts: 26
- Liked: never
- Joined: May 02, 2011 8:35 pm
- Contact:
Re: Windows File Level Restore
Working with support on this issue and discovered that the cmdlet Start-VBRWindowsFileRestore is either broken or 1/2 completed. Anyone else have any advice on how I can achieve this objective via scripting. I really can't afford to have to do a manual restore on every server, every month end.
Who is online
Users browsing this forum: No registered users and 11 guests