Error: Item with the same key has already been added.

Share This Post

This is an error that occurs when an instant VM recovery has started. Then, the backup copy job runs while the instant VM recovery is running and has not migrated to production. The original VM is deleted and replaced by the one that is in the instant VM recovery mode.

The local job can pick up on this change and backup the new VM that is running on the backup storage. However, the copy job begins to have a bug that causes the whole job to fail.

Even if you remove the data from the offsite location and remove the VM from the local job, the job continues to fail. The error also will not list out the VM that is causing the issue, but we have only seen this error occur after one of the VMs in the job has gone through an instant VM recovery.

The first thing that needs to be done is to migrate the new VM from the backup storage to production.

The new VM should already be in the local job, and it can be left in there. The issue is fixing it on the offsite location. Doing a rescan on the service provider or removing the data for that VM does not work. For this to work, the backups also need to be set to Per VM backup chain. If they are not set to Per VM Backups, then this solution will not work.

Next, you need to remove the Per VM chain of the VM that is causing the issue. It cannot be removed from the Veeam Console or else it will display this error:

The VM needs to be removed from the service provider side in the repository.

Once this is deleted the issue will still be there. Even though all the past data is gone, it will still show the same error for the whole job, and none of the other VMs in the job can be backed up.

The final step is taking all the data from the job and moving it outside of the tenant directory on the service provider side. It needs to be moved outside of the tenant directory and rescanned from the tenant side in Veeam.

After the rescan, the job data should no longer show up under the backups section. You will then want to move that job data back into the tenant directory from the service provider side in the same way that you moved it out.

Next, you will want to do another rescan on the tenant side in Veeam. The job should show back up in the backups section. You will want to ensure that the Copy Job that was getting this error is mapped to the job correctly. After that has been completed, the job should be able to transfer data for the other VMs in the job.

I have seen where the VM that was causing the issue fails after this but the other VMs have been able to run. My solution to that was to make a separate local job and offsite job just for that VM and get all new data for it.

More To Explore