I'm writing a ps script to add/remove the vCenter appliance from various jobs to prevent the job failing with error -
This error occurs because the vCenter appliance has been migrated to another host and then perhaps migrated back to the same host. The size of the vm in the job gui is 0 bytes. VBR can no longer find the VM since the vm appliance's uid/morefid has changed between host migrations and does not match the historical record in the job. As this is the vCenter vm it is backed up via the host directly.Virtual Machine VMware vCenter Server Appliance is unavailable and will be skipped from processing. Nothing to process. All machines were excluded from task list.
My question is, what information can I use to correlate the uid of the VM to the info in the backup job to compare for a mismatch? I'd prefer not to rely on the status of the job and the error itself, rather the MoRefID. Ideally this script would run before the scheduled job to prevent failures from occurring in the first place. Am I overlooking something here, or is there some other novel autonomous solution that I haven't considered?
Find-VBRViEntity output:
Code: Select all
ConnHostId : c2759693-9a95-489a-b7db-779bdfbf9b4d
Type : Vm
Reference : 16
Id : c2759693-9a95-489a-b7db-779bdfbf9b4d_16
Name : VMware vCenter Server Appliance
Path : 172.16.24.10\VMware vCenter Server Appliance
VmHostName : HostyMcHostFace
VmFolderName : vm
IsLegacyFaultTolerance : False
FaultToleranceType : None
GuestInfo : Veeam.Backup.Model.CGuestInfo
Uuid : 564d0dc7-8189-c559-e1ad-3044acd63689
PowerState : PoweredOn
IsTemplate : False
ProvisionedSize : 311209832064
UsedSize : 311209823808
Platform : EVmware
Code: Select all
LogNameMainPart : JobbyMcJobFace
FreeBackupImpl :
IsFree : False
UserCryptoKey :
Uid : 22d92d61-ae27-4846-afc9-f9f89f38dc19
Id : 22d92d61-ae27-4846-afc9-f9f89f38dc19
Info : Veeam.Backup.Model.CDbBackupJobInfo
JobType : Backup
SourceType : VDDK
JobTargetType : Backup
TargetType : Other
TypeToString : VMware Backup
Description :
Name : JobbyMcJobFace
BackupPlatform : EVmware
TargetHostId : 00000000-0000-0000-0000-000000000000
TargetDir : ddboost://dd.example.com:Veeam_Backups@/
TargetFile : JobbyMcJobFace
Options : Veeam.Backup.Model.CJobOptions
IsContinuous : False
BackupPolicyTag :
NameWithDescription : JobbyMcJobFace
SqlEnabled : False
OracleEnabled : False
PostgreSqlEnabled : False
ParentJobId :
ParentScheduleId :
Usn : 1198321794
PolicyJobId : 00000000-0000-0000-0000-000000000000
IsCdpReplica : False
HvReplicaTargetOptions : Veeam.Backup.Model.CDomHvReplicaTargetOptions
BackupStorageOptions : Veeam.Backup.Model.CDomBackupStorageOptions
BackupTargetOptions : Veeam.Backup.Model.CDomBackupTargetOptions
HvSourceOptions : Veeam.Backup.Model.CDomHvSourceOptions
NotificationOptions : Veeam.Backup.Model.CDomNotificationOptions
JobScriptCommand : Veeam.Backup.Model.CDomJobScriptCommand
VcdReplicaOptions : Veeam.Backup.Model.CDomVcdReplicaOptions
ViReplicaTargetOptions : Veeam.Backup.Model.CDomViReplicaTargetOptions
CloudReplicaTargetOptions : Veeam.Backup.Model.CDomCloudReplicaTargetOptions
ViSourceOptions : Veeam.Backup.Model.CDomViSourceOptions
VssOptions : VssSnapshotOptions: [Enabled: [False], ApplicationProcessingEnabled: [True], IgnoreErrors: [False], IsCopyOnly: [False], UsePersistentGuestAgent: [False]], WinGuestFSIndexingOptions: [Type:
[None]], LinGuestFSIndexingOptions: [Type: [None]], SqlBackupOptions: [TransactionLogsProcessing: [TruncateOnlyOnSuccessJob], BackupLogsFrequencyMin: [15], UseDbBackupRetention: [True],
RetainDays: [15], ProxyAutoSelect: [True]FailJobOnDbAbsenceOrBackupImpossibility: [False]], ExchangeBackupOptions: [TransactionLogsProcessing: [TruncateOnlyOnSuccessJob]], WinCredsId:
[00000000-0000-0000-0000-000000000000], LinCredsId: [00000000-0000-0000-0000-000000000000], Old Properties: [Enabled: [False], IgnoreErrors: [False], GuestFSIndexingType: [None],
IncludedIndexingFolders: [], ExcludedIndexingFolders: [], LinGuestFSIndexingType: [None], LinIncludedIndexingFolders: [], LinExcludedIndexingFolders: [], IsFirstUsage: [True]]
ScheduleOptions : Start time: [6/9/2022 02:00:00], Latest run time: [6/8/2022 09:46:46], Timeout for backup completion: [180min], Next run time: [], Daily options: [Enabled: True, DayNumberInMonth: Everyday,
Days: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
IsChildJob : False
IsRunning : False
IsIdle : False
IsScheduleEnabled : True
SourceProxyAutoDetect : False
IsDeleted : False
IsInitialReplica : False
IsMappingReplica : False
IsEpPolicy : False
IsBackupPolicy : False
IsBackup : True
IsBackupSync : False
IsBackupCopy : False
IsTapeCopy : False
IsStorageCopy : False
IsPluginBackupCopy : False
IsBackupCopySimpleMode : False
IsLogBackupCopy : False
IsWorkerJob : False
IsLogBackupCopyWorkerJob : False
IsChildWorkerJob : False
IsPolicyJob : False
IsSnapshotReplica : False
IsLegacyReplica : False
IsReplica : False
IsCloudReplica : False
IsVmCopy : False
IsTapeBackup : False
HasNoJobRecord : False
IsFileTapeBackup : False
IsVmTapeBackup : False
IsNasBackup : False
IsNasBackupCopy : False
IsAgentManagementChildJob : False
IsAgentManagementParentJob : False
IsAgentPolicyChildJob : False
IsAgentStandaloneJob : False
LinkedJobs : {}
LinkedJobIds : {}
LinkedRepositories : {}
LinkedRepositoryIds : {}
LinkedBackups : {}
IsForeverIncremental : False
IsBackupJob : True
IsEndpointJob : False
IsLinuxEndpointJob : False
IsMacEndpointJob : False
SheduleEnabledTime : 11/9/2021 00:12:46
IsBackupCopyGfsEnabled : False
AutoScheduleOptions : Veeam.Backup.Model.CAutoScheduleOptions
PreviousJobIdInScheduleChain :
LatestRunLocal : 6/8/2022 02:00:02
Code: Select all
Id : e467b904-dbe3-4ea1-9368-0d6a52a6a494
ObjectId : 71b3b464-d6ea-47c3-bbbd-40792cd6b44b
Usn : 1198318632
Object : Name: VMware vCenter Server Appliance
TypeDisplayName : Virtual Machine
Filter :
Role : EInclude
Name : VMware vCenter Server Appliance
Type : Include
Location : 172.16.24.10\VMware vCenter Server Appliance
OrderNo : 0
ApproxSizeString : 279.7 GB
Info : Veeam.Backup.Model.CDbObjectInJobInfo
JobId : 22d92d61-ae27-4846-afc9-f9f89f38dc19
IsFolder : False
IsIncluded : True
IsVssChild : False
IsExcludeDisksChild : False
IsExcluded : False
IsExtended : False
PolicyType : None
SourceObjType : BackupObject
VssOptions : VssSnapshotOptions: [Enabled: [True], ApplicationProcessingEnabled: [True], IgnoreErrors: [False], IsCopyOnly: [False], UsePersistentGuestAgent: [False]], WinGuestFSIndexingOptions: [Type:
[ExceptSpecifiedFolders], IncludedFolders: [], ExcludedFolders: [%windir%; %ProgramFiles%; %ProgramFiles(x86)%; %ProgramW6432%; %TEMP%]], LinGuestFSIndexingOptions: [Type: [ExceptSpecifiedFolders],
IncludedFolders: [], ExcludedFolders: [/cdrom; /dev; /media; /mnt; /proc; /tmp; /lost+found]], SqlBackupOptions: [TransactionLogsProcessing: [TruncateOnlyOnSuccessJob], BackupLogsFrequencyMin: [15],
UseDbBackupRetention: [True], RetainDays: [15], ProxyAutoSelect: [True]FailJobOnDbAbsenceOrBackupImpossibility: [False]], ExchangeBackupOptions: [TransactionLogsProcessing: [TruncateOnlyOnSuccessJob]],
WinCredsId: [00000000-0000-0000-0000-000000000000], LinCredsId: [00000000-0000-0000-0000-000000000000], Old Properties: [Enabled: [True], IgnoreErrors: [False], GuestFSIndexingType:
[ExceptSpecifiedFolders], IncludedIndexingFolders: [], ExcludedIndexingFolders: [%windir%; %ProgramFiles%; %ProgramFiles(x86)%; %ProgramW6432%; %TEMP%], LinGuestFSIndexingType: [ExceptSpecifiedFolders],
LinIncludedIndexingFolders: [], LinExcludedIndexingFolders: [/cdrom; /dev; /media; /mnt; /proc; /tmp; /lost+found], IsFirstUsage: [True]]
ExtendedOptions : Veeam.Backup.Model.COijExtendedOptions
DiskFilter : Veeam.Backup.Core.CDiskFilter
DiskFilterInfo : Veeam.Backup.Model.CDiskFilterInfo
UpdateConfig : True