I experienced an interesting error for the Veeam Cloud Connect tenant backup copy job recently. Contacted Veeam support who provided the solution and am sharing it here, as it was a new error and fix for me.
The error presented on customer (Cloud Connect tenant) backup copy job and upon completing all virtual machines backed up successfully, but the job retention settings were not applied ( which deletes the oldest backup file) and then any subsequent jobs failed with the error message below:
Unable to access target repository Error: The DELETE statement conflicted with the REFERENCE constraint “FK_OIBs_Storages”
Upon inspecting the source Veeam backup job of the backup copy job the source job and backups were all healthy and without issue. Upon contacting Veeam Support they supplied the following solution to be applied on the tenant Veeam server:
1) Create a configuration backup manually –
(https://helpcenter.veeam.com/docs/backup/vsphere/vbr_config_manually.html?ver=100)
2) Hold control (keep holding it until this step is complete), right click the effected job, and click on remove from configuration.
3) Rescan your repository manually (https://helpcenter.veeam.com/docs/backup/vsphere/rescanning_backup_repositories.html?ver=100)
4) Re-map the chain you’ve deleted with the job (use “Map backup” button)
(https://helpcenter.veeam.com/docs/backup/vsphere/backup_job_storage_vm.html?ver=100)
5) Run the job to check whether it works
This solution did the trick and the customer backup copy job is again working. Veeam Support did not fully explain what caused the issue, but the above solution simply removes the backup copy job from the veeam server configuration (or backend database), and then the re-adds the job.