Folder Comparison
Compare two folders file by file and detect when a replication or restore drifts from the original.
The Folder Comparison check compares two folder trees on a device file by file and reports missing, extra or different files. This lets you catch a replication that has fallen behind or a restore that does not match the original. The check runs on Windows, Linux, and macOS (x64 and Arm64 each) every 60 minutes. The interval belongs to the check itself and cannot be changed per assignment.
Prerequisites
- You need the Monitoring Check Management permission.
- The target device must have a connected agent.
- Both folders must be reachable from that device, and the agent process needs read permission for both folders, including all subfolders and files.
Steps
- Go to Devices and open the device.
- Click the Checks tab → Add Check → Folder Comparison.
- Under Reference folder, enter the folder that is expected to be correct, for example
D:\Data\Projects. - Under Folder to compare, enter the copy that should match it, for example
E:\Replica\Projects. - Optional: under Excluded file names, add files to ignore in both folders, such as
Thumbs.dbor.DS_Store. - Click Add Check.
The first result then appears in the device's Checks tab.
Settings
How the check compares
- The check matches the files of both folders by their relative path. A missing file exists in the reference folder but not in the folder to compare. An extra file exists only in the folder to compare. A different file exists in both folders but does not match.
- Files of different size always count as different. For files of equal size, Compare file contents decides whether the contents or the modification time are compared.
- On Windows, path case does not matter. On Linux and macOS,
Report.txtandreport.txtcount as two different files. - Only files are compared. The check does not report empty folders that are missing on one side.
- Hidden and system files are included. The check does not walk into linked folders such as symbolic links or junctions.
- With Compare file contents, every run fully reads each file of equal size on both sides. For large data sets this puts a corresponding load on the disks.
- Without Compare file contents, your copy or replication tool must preserve the files' modification time. Otherwise the check reports every copied file as different.
Results
A single file that cannot be read during the comparison, or that disappears meanwhile, counts as different. The check therefore never reports a match for content it did not actually read.
The short result reads, for example, "Folder comparison — Critical: 3 difference(s)". The detailed result text shows:
- Reference and Compare: the two paths with their file counts
- Differences: the total, split into missing, extra and different
- up to 10 paths per category, prefixed with "missing:", "extra:" or "different:"; if there are more, "(list truncated)" follows
FAQ
Why does the check report differences although replication works?
Why does the check report differences although replication works?
The check compares the state at the time it runs. Files that changed in the reference folder since the last replication run therefore appear as different, missing or extra until the next replication has transferred them. You can add frequently changing files with a known name under Excluded file names. If short delays are normal, enable Report differences as warning.
Can I exclude entire subfolders from the comparison?
Can I exclude entire subfolders from the comparison?
No. Excluded file names only applies to file names, not to folders. To compare only part of a folder tree, choose the matching subfolders as Reference folder and Folder to compare, or create several checks.
Was this helpful?
More in Storage & files
Mount Point Free SpaceCeph Cluster HealthCeph Node DaemonsCeph Storage & PerformanceStill need help? Ask the team