Git Product home page Git Product logo

Veeam sensor error: An exception occurred while trying to process backups: The term 'TapeJob::GetAll' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. about prtgsensors HOT 13 CLOSED

andriesgithub avatar andriesgithub commented on August 17, 2024
Veeam sensor error: An exception occurred while trying to process backups: The term 'TapeJob::GetAll' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

from prtgsensors.

Comments (13)

Damaskar avatar Damaskar commented on August 17, 2024 2

Huh

[Veeam.Backup.Core.CBackupJob]::Get("Backup Job Damaskar-PC").JobType

Gave me EpAgentPolicy instead of Linux Agent Policy
I guess [Veeam.Backup.Core.CBackupJob]::Get("My backup job") showing something else in Job Type for some reason.
I put EpAgentPolicy in 178 line and everything works now
Thank you very much

from prtgsensors.

lordmilko avatar lordmilko commented on August 17, 2024 1

There's 2 issues here

  1. The UnknownJobTypeBackupHandler is using a function that no longer exists for checking whether a job is a tape job
  2. The job you've got does not have a type that is known to Get-VeeamBackupStatus.ps1, indicating possibly Veeam renamed it in a recent version

Are you potentially able to set a breakpoint on line 176 (switch($backup.JobType)) in the PowerShell ISE and then advise what the output of $backup.JobType is in the PowerShell console down the bottom? As noted in the README:

No attempt is made at backwards compatibility; when Veeam breaks the script, I fix it to make it work. No guarantee is made that such corrections will be uploaded to GitHib; this script is great, but be prepared to get your hands dirty when it breaks.

from prtgsensors.

andriesgithub avatar andriesgithub commented on August 17, 2024

Hi,

Thanks for your reply. I have set a breakpoint on line 176. The output:
Entered Main Entered [VeeamBackupStatus]::GetStatus Entered [VeeamBackupStatus]::GetStatusInternal -Loading Veeam PSSnapIn -Connecting to Veeam Backup Server Entered [VeeamBackupStatus]::GetBackupsToProcess Entered [VeeamBackupStatus]::GetBackupHandler

I think Veeam renamd some codes. I dont which codes i have to change in the script :)

from prtgsensors.

lordmilko avatar lordmilko commented on August 17, 2024

Are you able to confirm what version of Veeam + Veeam Agent for Windows you're running? I tested this with Veeam Backup & Replication 11.0.0.837 against a Veeam Agent for Windows job and it worked as expected

from prtgsensors.

Damaskar avatar Damaskar commented on August 17, 2024

Hello,

I have same problem when im trying to monitor Linux agent backup job.
Setting breakpoint on line 176 give me same results as andriesgithub.

Versions:
BRv11 - 11.0.1.1261
Linux Agent - 5.0.2.4567

from prtgsensors.

lordmilko avatar lordmilko commented on August 17, 2024

This script has not been tested with Veeam Agent for Linux, this could be the source of the issue

Can you try opening a Veeam PowerShell prompt (via the Veeam Console on your VBR server) and then doing

[Veeam.Backup.Core.CBackupJob]::Get("My backup job")

Where My backup job is the name of your backup job. This should return information about your backup job. What is the value of the JobType property in the output that is emitted?

from prtgsensors.

Damaskar avatar Damaskar commented on August 17, 2024

Thank you for such fast reply.

Here is JobType: Linux Agent Policy

from prtgsensors.

lordmilko avatar lordmilko commented on August 17, 2024

Thanks @Damaskar,

Does the JobType actually have spaces in it? i.e. is the value LinuxAgentPolicy or Linux Agent Policy?

On line 178 of the script is the dispatcher for most backup types. Can you add the value from JobType exactly as it is written to this list and then try and run the script again?

{$_ -in "Backup","Replica","BackupSync","EndpointBackup"} { $handler = [BackupHandler]::new($backup, $this.jobName) }

so if the JobType is foo line 178 would become

{$_ -in "Backup","Replica","BackupSync","EndpointBackup","foo"} { $handler = [BackupHandler]::new($backup, $this.jobName) }

from prtgsensors.

Damaskar avatar Damaskar commented on August 17, 2024

JobType according to veeam powershell is exactly Linux Agent Policy with spaces.
I tried to put both variants LinuxAgentPolicy and Linux Agent Policy in 178 line, still getting same result:

An exception occurred while trying to process backups: The term 'TapeJob::GetAll' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

from prtgsensors.

lordmilko avatar lordmilko commented on August 17, 2024

My recommendation would be to put a breakpoint on line 59 and simply step through the code until you get to line 176

Then you can see what JobType it's switching on

from prtgsensors.

lordmilko avatar lordmilko commented on August 17, 2024

From a quick look at my Veeam server, I definitely don't think the JobType you got is right

JobType is a value of type Veeam.Backup.Model.EDbJobType which is an enum, meaning there's no spaces

Maybe try the following (enter the name of your backup job)

[Veeam.Backup.Core.CBackupJob]::Get("Backup Job Damaskar-PC").JobType

from prtgsensors.

lordmilko avatar lordmilko commented on August 17, 2024

It looks like the type is EpAgentPolicy

Are you able to try adding that to the list?

from prtgsensors.

lordmilko avatar lordmilko commented on August 17, 2024

@andriesgithub,

Are you able to advise what the output of [Veeam.Backup.Core.CBackupJob]::Get("My backup job").JobType is in a Veeam PowerShell prompt for you?

Alternatively, if you download the latest version of the script (1.3.17) and try and re-run it it should no longer crash before telling you the name of the JobType it didn't know how to handle

from prtgsensors.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.