4.17 Duplicate Files in a Standard Pair

In a Dynamic File Services standard pair, each file is intended to have a single instance on either the primary path or the secondary path. When a file is created, modified, or deleted through the merged view, DynamicFS automatically manages the file so that a single instance of a file exists. When policies are enforced, DynamicFS moves the single instance of a file between the two paths, and deletes the original copy of the file after the move is successfully completed.

Duplicate files are those where two instances the file have the same name and relative path in both locations. The content of the files might differ. If two instances of a file occurs only the file instance on the primary is visible and accessible to the user. Users are not aware if duplicate files are present. However, a message is logged for the administrator. If a policy run attempts to move a file that has a duplicate in the target location, the move fails, and the error is logged in the Statistics > Policy execution history > Files not moved report.

Duplicate files are not intended to occur, but the situation can arise when you restore files from backup media, if files are accessed outside the merged view, or if the media becomes unavailable during a policy run and a file move is incomplete. Each of these situations is described in more detail below. For information about detecting and reporting duplicate files, see Section 8.12, Reporting Conflicts for Duplicate Files.

4.17.1 Restoring Files from Backup Media

Duplicate files can occur when you restore files from backup media if different instances of a file are copied to the primary storage location and the secondary storage location. Backups for the primary and secondary are typically made at different times. Whether a file is captured in both backups depends on which policies were run in between the two backups. If you back up the primary path more frequently than the secondary path, the instance of the file that is restored on the primary storage area should be the most current of the two instances of the file.

4.17.2 Accessing Files Outside the Merged View

Duplicate files can also occur if users are allowed to access files directly instead of via the merged view. For example, a duplicate file can be created if a user has direct access to the two paths and manually copies a file from one path to the other. Users should always use the merged view of files in the pair when performing actions on them.

4.17.3 Losing a Media Connection when Moving Files

Duplicate files might occur if the source location or the target location of a file move becomes unavailable during a policy run. For example, if a connection is lost between the server and the secondary storage media, the file move that is in progress at that time cannot be completed, and the policy run is stopped. An Invalid File Handle error for the file is reported in the policy move log in the Statistics > Policy execution history > Files not moved > Comment field.

For file moves, Windows creates a sparse file in the target location that has the same file name and size as the original, and then copies the bits to the file. The original instance of the file is not deleted until all bits have been successfully copied to the new file instance. If the file move is interrupted, the information in the target location might be incomplete, and two instances of the file remain, which creates a duplicate file.

When duplicate files are caused by an incomplete move, the valid file is the instance on the source location of the move, and the invalid file is the instance on the target location. If the incomplete file resides on the primary location, users see only the corrupted file. However, the valid file instance remains on the secondary location, and no data is actually lost.

To resolve this duplicate file situation, you must identify the duplicate files and delete the invalid instance of the file. Your knowledge of the policy direction setting for the policy run where the duplicate file was created can help to determine which instance of the file is valid. You can review the Statistics > Policy execution history > Files not moved report for the policy run to identify the duplicate file and the target location of the policy run. You can also run the Pair Check (dswPairCheck.exe) utility to find the duplicate file. For information about using the Pair Check utility to identify duplicate files, see Dynamic File Services Pair Check Utility in the Dynamic File Services 2.2 Client Commands and Utilities Reference.