Veeam Agent: Failed to process method NasMaster: The file specified already exists.

Veeam has the ability to backup File Shares and in this case I had an NFS backup that randomly started failing.  The only thing that had changed was a recent upgrade from Veeam 11 (specifically 11.0.1.1261) to Veeam 12 (specifically 12.3.1.1139).   The upgrade went smoothly with no errors generated during the installation process.  However about a month later, I received this error during the execution of a scheduled backup job:

Agent: Failed to process method {NasMaster.ExecuteBackupProcessor}: The file specified already exists.

The details of the error included:

Path: [Host: [xxx.xxx.xxx.xxx], Mount: [/path/to/backup], Disk: [Name/name/data/data/xxx.vblob], Type: [nfs3 (1)]]. The file specified already exists. NFS status code: 17 Failed to create nfs file stream. Failed to create nfs file. Failed to perform file backup Error: Agent: Failed to process method {NasMaster.ExecuteBackupProcessor}: The file specified already exists. Error: Agent: Failed to process method {NasMaster.ExecuteBackupProcessor}: The file specified already exists.

The automatic retries failed in the same manner.  At first I thought perhaps it was just a fluke, so I ignored it.  However, on the next scheduled backup the same error occurred.

The first thing I tried was to do a health check and repair on the backup using these two steps:

  1. Upgrade Veeam to the latest version (specifically 12.3.2.3617)
  2. Manually run a health check on the backup files

To perform a health check:

  1. Open Veeam Backup and Replication
  2. Go to Jobs -> Backup
  3. Find the job that was failing
  4. Right click on it -> Run health check

When I ran the health check, some errors were found and repairs were made to the backup:

Succeeded Repairing backup completed successfully

After it was complete, the job was manually run and it completed without any error.

I thought the issue was resolved, but it occur again on the next backup with the same error. However this time even though it failed, files would still be backed up. Also the job would automatically retry and the retry job would be successful. The details of the retry job showed that it processed no files, but completed without any error.

This pattern kept repeating.

I tried increasing the CPU and memory of the machine to check if it was starved of resources, however that also didn’t fix the problem.

I then tried deleting the backup on disk. The steps I followed to delete the backup from the disk:

  1. Open Veeam Backup and Replication
  2. Go to Backups -> Disk
  3. Find the backup related to the job that was failing
  4. Right click on it -> Delete from disk

This seemed to work initially, however the errors started showing up again after multiple cycles.

The final solution I found as a clue in this thread

https://www.reddit.com/r/Veeam/comments/vagwao/veeam_errors_failed_to_create_backup_file_because/

One key topic seemed to be around permissions of the ProgramData folder associated with the backup:

C:\ProgramData\Veeam\BACKUP folder

however, nothing looked unusual about the permissions at this location for this configuration.

What finally worked for me was to perform the following:

  1. Shut down Veeam and all related background services
  2. Completely delete the folder at the C:\ProgramData\Veeam\ location that is associated with the job.
  3. Reboot the system

After rebooting the system, it may take a couple backup cycles to completely flush out the failures. After that the errors should not return.