However, the Veeam SQL database can be edited to change the old MoRef to the new MoRef. Please note this only works if the datastore has not changed, if it has, then the CBT data is invalid, and you want new backups/replication to avoid data corruption.
NOTE: To directly edit query results in MS SQL, select “Edit Top 200 Rows” for the table you want, then in the tool bar click the “SQL” button which opens the query pane. You can then put your query in that pane, run it to update the results below, and directly edit them.

1. Before upgrading, connect to the host via PowerCLI and run the command below to output a list of VMs and their IDs. Save this data.
Get-VM | Get-View | Select-Object Name,MoRef

2. Upgrade the host, add the VMs to inventory, then re-run the command to find the new MoRefs.
3. Open the Veeam console, go to “Inventory” and properties on the upgraded server. Go to the “credentials” page and click “Apply”; if you need to update the credential information do it before clicking “Apply”. On the certificate prompt click “Continue”, and then finish. Once it’s done updating the host information, close and re-open the console.
4. Open SQL Management Studio on the Veeam backup server, look at the [Hosts] table, and record the ID of the target host that you upgraded.
SELECT * FROM [VeeamBackup].[dbo].[Hosts]

5. If you have replication jobs whose replicas are on the upgraded host, edit the [Replicas] table and update the old replica MoRef in the [target_vm_ref] column with the new replica MoRef. If you have multiple replicas on multiple hosts of a VM, reference the [target_location] column to locate the correct VM. If you’re only updating backup jobs you can skip this step.
SELECT * FROM [VeeamBackup].[dbo].[Replicas]

6. Edit the [BObjects] table. Display all rows from the [host_id] of the host you upgraded and update the MoRefs in the [object_id] column. If you have an old MoRef for a VM which doesn’t exist anymore and would duplicate one of the new MoRefs, increase its MoRef out of the range of IDs used, e.g. IDs “100003’ and “100004” below.
SELECT * FROM [VeeamBackup].[dbo].[BObjects] WHERE [host_id] = ‘<Upgraded Host ID>'

7. Run your backup and replication jobs. They should run normally, just like before the upgrade. Please be sure to commit any SQL changes before running the jobs, and it’s a good idea to simply restart the entire backup server if possible.
NOTE: If you
already upgraded your host without recording the MoRefs first, you can still find
what the old MoRefs were. If you refer back to step 6, you can resolve the unique
ID for the VM in the [id] column to the VM name by finding that unique ID in
the [BObject_id] column of the [BObjectsSensitiveInfo]
table.
