I'm not fluent with Veeam powershell, more of a hack lol
Anyhow, I had this script running as a post process after backup. Basically, it just mounts the latest restore point and copies some specific files to the same server.
Code: Select all
Remove-Item 'T:\Temp\DATA' -Recurse
$origfile = "D:\DATA"
$backup = Get-VBRBackup -Name "BackupJob1"
$result = Get-VBRRestorePoint | where {$_.name -eq "server01"} | Sort-Object creationtime -Descending | Select-Object -First 1 | Start-VBRWindowsFileRestore
$flrmountpoint = ($result.MountSession.MountedDevices | ? {$_.DriveLetter -eq (Split-Path -Qualifier $origfile)}).MountPoint
$file = $flrmountpoint + (Split-Path -NoQualifier $origfile)
Copy $file T:\Temp\DATA -Recurse
Stop-VBRWindowsFileRestore $result
Copy-Item : Cannot find path 'C:\VeeamFLR\server01\DATA' because it does not exist.
I'm assuming it doesn't create the VeeamFLR on the mounted server? Is there a way to redirect the VeeamFLR directory and how would I go about doing that? Thanks for any help in advance!