-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An exception occurred while trying to process backups: Access to the path 'Veeam\Backup' is denied. #3
Comments
After generating the error can you please provide the output of $error[0].Exception.StackTrace In the code, we can see the following hidden [void]GetStatusInternal()
{
[Logger]::Log("Entered [VeeamBackupStatus]::GetStatusInternal")
$this.Init()
$backup = $this.GetBackupsToProcess()
...
}
hidden [void]Init()
{
[Logger]::Log("-Loading Veeam PSSnapIn")
#Add-PSSnapin -Name VeeamPSSnapIn -ErrorAction Stop
ipmo "C:\Program Files\Veeam\Backup and Replication\Console\Veeam.Backup.PowerShell\Veeam.Backup.PowerShell.psd1" -DisableNameChecking
[Logger]::Log("-Connecting to Veeam Backup Server")
Disconnect-VBRServer
Connect-VBRServer -Server $this.server -Timeout 20
}
hidden [object]GetBackupsToProcess()
{
[Logger]::Log("Entered [VeeamBackupStatus]::GetBackupsToProcess")
return CBackupJob::Get($this.jobName)
}
Based on the fact a status message is printed in steps 2 and 4, the only stage at which an error could occur would appear to be step 3. Maybe check that the server you're trying to connect to is correct; the first argument is the hostname of your VBR server e.g. |
Hi, thanks for your switft feedback. You wrote: "After generating the error can you please provide the output of I came to the same conclusion, that the error must be caused by the two lines after Some googling braught up this entry for another Veeam PRTG sensor script, where people seem to have the same issues: vMarkusK/Advanced-PRTG-Sensors#80
When using that in PRTG, the error changes to
We do not need PSX64.exe with this script, correct? I tried both just hostname and FQDN of the Veeam server, followed by the backup job to check. As I mentioned, |
If it says your username is the name of your probe server, this indicates it is not in fact running using Windows Authentication, it is running as SYSTEM - which is the account the PRTG Probe Service runs as. I can see that your debug output says The PRTG Probe Service is a 32-bit process, however the Veeam Backup & Replication PowerShell module is 64-bit only. As such it must be run within a 64-bit process. 32-bit processes will load PowerShell from SYSWOW64. I wrote this script before I wrote PSx64, so this script includes its own built-in logic for self elevating to a 64-bit process I would suggest running Process Monitor and force a refresh of the script in the PRTG UI. Add the Command Line column, and you'll be able to see exactly what commands are being executed, whether it's self elevating, and you'll also be able to inspect whether any processes are running as SYSTEM or not |
Thanks again for your quick reply! Since after some hours of troubleshooting I still don't know what to do from here, I think I will try my luck with a different script. Thanks for your support! |
Hi,
I read the guide, installed the B&R console and put the Get-VeeamBackupStatus.ps1 script and corresponding lookup into place. A Windows user who has the Veeam Backup Administrator role is saved in the device which I added the sensor to and the sensor is set to "use Windows credentials of upstream device".
Now when the sensor does a query, I get the following result:
If I run a powershell on the probe system as the above-mentioned user, and execute the script with the same parameters as entered in the PRTG sensor, it returns the backup data as intended. Also, in the same PS session, Connect-VBRServer works fine.
The path in the error message ('Veeam\Backup') looks like a substring of the path to the Veeam PS SnapIn ("C:\Program Files*Veeam\Backup* and Replication\Console\Veeam.Backup.PowerShell\Veeam.Backup.PowerShell.psd1"), although, according to the DEBUG entry above, the SnapIn was already loaded when the error is returned.
I am at a loss here. Any suggestions? Thanks in advance.
thwgha
The text was updated successfully, but these errors were encountered: