Question

Add servers to VBRcomputerbackupjob

  • 8 August 2023
  • 5 comments
  • 110 views

Hello All,

 

Could someone help me with adding servers to agent-based backup jobs via powershell/commandline. In the below command i get error while mentioning Job  and backupobject.

Set-VBRComputerBackupJob -Job <VBRComputerBackupJob> [-Name <string>] [-Description <string>] [-BackupObject <Object[]>]. Where RKTest is an existing Job, I’m trying to add objects or servers to the backup job RKTest.

 

 

Error:

cmdlet Set-VBRComputerBackupJob at command pipeline position 1
Supply values for the following parameters:
Job: "RKTest"
Set-VBRComputerBackupJob : Cannot bind parameter 'Job'. Cannot convert the ""RKTest"" value of type "System.String" to type "Veeam.Backup.PowerShell.Infos.VBRComputerBackupJob".
At line:1 char:1
+ set-vbrcomputerbackupjob
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Set-VBRComputerBackupJob], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Veeam.Backup.PowerShell.Cmdlets.SetVBRComputerBackupJob

--------------------------------------------------------------------------------------

Add-VBRComputerBackupJob : A backup object with the specified name is of unsupported type: {sgdvl184.sgd.flextronics.com}.
At line:1 char:1
+ Add-VBRComputerBackupJob
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-VBRComputerBackupJob], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException,Veeam.Backup.PowerShell.Cmdlets.AddVBRComputerBackupJob


 


5 comments

Userlevel 6
Badge +4

Hello,

You should follow the example mentioned at the end here : Set-VBRComputerBackupJob - Veeam Backup PowerShell Reference

You can’t give JOB name because it’s “string” powershell object and Set-VBRComputerBackupJon needs “VBRComputerBackupJob” type. To get this type, you need to use Get-VBRComputerBackupJob as mentionned in the link I provided you.

Thnx for the quick turn around, however still unable to resolve the error. I did try as given the example.

The client i’m trying to add is a linux machine(VM) and is already in one of the backup jobs. So i beleive its of supported type and agent is been installed in the respective server. Let me know if i’m giving anything wrong here. 

Syntax:

$job = Get-VBRComputerBackupJob -Name "RKTest"
Set-VBRComputerBackupJob -Job $job -BackupType EntireComputer -BackupObject (hostname)

 

Error:

Set-VBRComputerBackupJob : The specified computer backup job is invalid.
Backup objects:
A backup object with the specified name is of unsupported type:

Userlevel 7
Badge +7

Thnx for the quick turn around, however still unable to resolve the error. I did try as given the example.

The client i’m trying to add is a linux machine(VM) and is already in one of the backup jobs. So i beleive its of supported type and agent is been installed in the respective server. Let me know if i’m giving anything wrong here. 

Syntax:

$job = Get-VBRComputerBackupJob -Name "RKTest"
Set-VBRComputerBackupJob -Job $job -BackupType EntireComputer -BackupObject (hostname)

 

Error:

Set-VBRComputerBackupJob : The specified computer backup job is invalid.
Backup objects:
A backup object with the specified name is of unsupported type:

Are you trying to mix different backup workloads in the same job?

I want to add a windows or linux to a agent based backup job via command line/powershell is what i’m looking for.

The Job name is RKTest. The server XYZ needs to be added to the backup Job which is  linux agent job. What would be powershell script to add XYZ to RKTest.

Badge +1

Hi, 

Looks like in Set cmdlet you are trying to pass job name of string type to Job parameter, but Job parameter accepts only objects of VBRComputerBackupJob type, nor does Set-VBRComputerBackupJob convert string to job object:

Set-VBRComputerBackupJob : Cannot bind parameter 'Job'. Cannot convert the ""RKTest"" value of type "System.String" to type "Veeam.Backup.PowerShell.Infos.VBRComputerBackupJob"

Find the job you want to set first, then change specifications for the settings you want to amend, and finally pass changed specifications to Set-VBRComputerBackupJob cmdlet.

Now about this error:

Add-VBRComputerBackupJob : A backup object with the specified name is of unsupported type: {sgdvl184.sgd.flextronics.com}.

It would help if you share the workflow of how you obtain an agent you want to add to a backup job.

Comment