Replication fails with an error Failed to create backup on device Internal library error Failed build snapshot sequence

Replication fails with an error: "Failed to create backup on device. Internal library error. Failed build snapshot sequence"

Challenge

Replication fails with the following message in Acura's Events section or in the agent's logs:

  1. "Failed to create backup on device <...>: Internal library error.

  2. Failed to filter snapshots
  3. Failed to find end snapshot(<...>).
  4. Failed build snapshot sequence. Expected begin - <...>, end - <...>
  5. Guid of vss record header is empty. Broken snapshot id
  6. Failed to read header record
  7. Can't find last page.
  8. Unexpected vss record native offset. Actual(<...>), was expected(<...>)"

Cause

This is caused by faulty VSS operations and data inconsistency on the source machine which has led to the snapshot chain being broken. 

Solution

1. Make sure there are no 3rd party backup tools installed on the machine as they will interfere with Acura's operations while snapshots are being taken possibly causing corrupted data.
2. Check that there are no automated scheduled tasks (disk defragmentation, maintenance) on the machine. Turn them off if any.
3. Check the machine's shadowstorage configuration with the vssadmin list shadowstorage command for any discrepancies.
4. Execute the vssadmin delete shadows /all command to remove any existing snapshots. Sometimes, there is conflict when trying to delete VSS copies that causes the following message:
  1. Error: Snapshots were found, but they were outside of your allowed context.  Try removing them with the backup application which created them.
In that case, alternative commands may be necessary: 
  1. wmic shadowcopy delete — executed in the command prompt.
  2. diskshadow — open command prompt as administrator → Type diskshadow→ then on the DISKSHADOW> prompt type delete shadows all to delete/remove all shadow copies from the machine.
5. Once the obsolete snapshots have been removed, start a new replication for this machine through Acura's UI.