Task failed. Failed to expand object. Error: Object was not found
Change VM ID VEEAM database.
In my case I had to replace the old VM id with the new one.
There are multiple reasons why the VMID is changed. This can be caused by exporting and importing the VM for example. When this situation occurred you get the following error in VEEAM:
“Task failed. Failed to expand object. Error: Object was not found”
If you don’t want to add the new object and creating a new full back-up of the VM. You can change the VM ID in the database.
When this is done the forward incremental runs as before.
First we need to determine the OLD id where VEEAM is looking for.
This can be done with the following lines SQL Query against your VEEAM DB:
Get old object ID before Veeam version 9.5
1 2 3 4 5 |
SELECT bo.object_name, bo.object_id, bo.path FROM bjobs bj INNER JOIN ObjectsInJobs oij ON bj.id = oij.job_id INNER JOIN BObjects bo ON bo.id = oij.object_id WHERE bj.Name = 'VMJOBNAME' and bj.type=0 |
Get old object ID Veeam 9.5
1 2 3 |
SELECT Objectsinjobs.location, bobjects.object_id FROM BObjects INNER JOIN ObjectsInJobs ON ObjectsInJobs.object_id = BObjects.id where ObjectsInJobs.location like '%VMNAME%'; |
The following step is to get the new VMID from Hyper-V or VMWare.
With Hyper-V Virtual Machines Manager (SCVMM) PowerShell Module.
Run PowerShell as Administrator:
1 2 |
import-module virtualmachinemanager Get-VM VMNAME | ft name, ID |
With VMWare can this be done with PowerCLI on the ESX host.
Excuse me when I’m wrong, but I think:
1 |
get-vm | select name, Id |
SQL Query:
Put the new ID by SET.
Put the old ID by WHERE.
1 2 3 |
UPDATE bobjects SET [object_id] = '###' WHERE [object_id] = '###' |
*Tested with VEEAM Backup & Replication 8
Hi,
I’m facing the same issue but its a bit different… VMs running on particular host cannot be backed up at all unless I moved to different host. All Patches are identical, all hosts are part of the same CSV cluster, but when VMs running on one particular host, VMs are not being backed up… Any thoughts..?
Regards,
Hello,
Wich integration method you are using? The VMM, Hyper-v cluster or Standalone Hyper-v host mode?
Greetings,
This is not the same for Veeam9.5. Can you enlighten me? bo.object_name and bo.object_id are not in the bjobs table
Hello Ken,
Yeah you are right ive created a new query for Veeam 9.5.
I will update this post as we speak.
With Veeam 9.5 I used this sql script to find old id
SELECT Objectsinjobs.location, bobjects.object_id
FROM BObjects
INNER JOIN ObjectsInJobs ON ObjectsInJobs.object_id = BObjects.id
where ObjectsInJobs.location like ‘%VMNAME%’;
Hi Rob Verhees,
Could you please post the query for veeam 9.5. Thanks in advance.
to find the new VM ID in Veeam B&R v9.5, just create a new backup job and add the VM that ID has changed and then run the SQL query below to see the new VM ID
SELECT Objectsinjobs.location, bobjects.object_id FROM BObjects INNER JOIN ObjectsInJobs ON ObjectsInJobs.object_id = BObjects.id where ObjectsInJobs.location like ‘%VMNAME%’;
Then once you see the new VM ID, run the below script to change the old ID to the new ID
UPDATE bobjects
SET [object_id] = ”
WHERE [object_id] = ”
Thanks for your reply Brendan Main.
I updated my post.