Closed andriesgithub closed 2 years ago
There's 2 issues here
UnknownJobTypeBackupHandler
is using a function that no longer exists for checking whether a job is a tape jobAre 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.
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 :)
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
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
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?
Thank you for such fast reply.
Here is JobType: Linux Agent Policy
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) }
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.
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 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
It looks like the type is EpAgentPolicy
Are you able to try adding that to the list?
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
@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
Hi,
I'm getting an error while reading Windows Agent Backup in Veeam. The following error im getting: 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.
It's a separate backup job based on Windows Agent Backup
Any suggestions?