Feature Request: Improve Checksum Manifest Compatibility and Error Reporting

Feature Request: Improve Checksum Manifest Compatibility and Error Reporting

First, I'd like to say that rclone is an outstanding piece of software. I've used it extensively for large-scale data transfers and archival work, and I have tremendous respect for the flexibility and engineering behind it. thank you for such a valuable tool in this industtry providing unique ccompatibilitywith so many providers. its invaluable for moving massive data around.

However, I've recently run into an area where I think rclone could benefit from some additional attention: checksum manifest compatibility, particularly when importing manifests generated by other established applications such as TeraCopy.

The problem

I maintain large archives containing hundreds of thousands of files and routinely use SHA256 manifests to verify data integrity after transfers to remote storage.

TeraCopy is exceptionally efficient at generating SHA256 checksums across large collections 4-5x faster than rclone including using --download when remote checksum metadata isn't available or reliable. the app can generate manifest in over 20 hash formats.

What I discovered was that getting the manifest into a format accepted by rclone required considerably more manual intervention than I expected.

In my particular case, the conversion involved several adjustments:

  • Converting the checksum records to the expected SUM-format spacing of SHA 64 HEX VALUES+space+space+file path.

  • Removing the UTF-8 BOM.

  • Converting Windows backslashes to Unix forward slashes.

  • Removing leading path separators such as / and */.

  • Removing a leading # from certain directory names.

  • final commandi used for reference was:

    rclone checksum sha256 sha.manifest.filename.sha256 /onlne_Archive path --differ /differ.log --buffer-size 256M --fast-list --download --progress --checkers 12 --log-file rclone_check.log --log-level INFO

  • the version i was usnig at whatbox.ca is rclone 1.75.2

    • os/version: gentoo 2.18 (64 bit)
    • os/kernel: 6.18.57-gentoo-whatbox (x86_64)
    • os/type: linux
    • os/arch: amd64
    • go/version: go1.27.1-X:nodwarf5
    • go/linking: dynamic
    • go/tags: none

Once these changes were made, the manifest worked and rclone successfully verified the remote file contents against the SHA256 values.

The hashes themselves were never the problem. The difficulty was getting the two applications to agree on the representation of the checksum records and filenames.

Suggested improvements

I'd like to suggest a few possible enhancements:

  1. Broader manifest compatibility: Recognize common SHA256 manifest conventions produced by other widely used applications, including TeraCopy and standard GNU-style checksum utilities.

  2. BOM tolerance: Automatically recognize and ignore a UTF-8 BOM at the beginning of a manifest.

  3. Path normalization: Consider offering an optional mode to normalize Windows and Unix path separators and handle leading path separators where unambiguous.

  4. Special-character handling: Ensure that filenames containing characters such as # are handled as literal filename characters rather than being interpreted as syntax or metadata.

  5. More informative errors: When a manifest entry cannot be matched, provide a diagnostic that helps distinguish malformed checksum records from filename/path mismatches.

Why this matters

The current behavior can be particularly frustrating with large manifests.

When a manifest contains 250,000 entries, a minor formatting incompatibility can produce hundreds of thousands of sum not found errors. The resulting output gives the impression that the archive is missing files, when the actual problem may simply be how the manifest was formatted or interpreted.

A more tolerant parser, combined with clear diagnostics, would make rclone considerably more useful as a verification tool in mixed application environments.

I appreciate that strict parsing has advantages, particularly when data integrity is involved. I'm not suggesting that rclone should silently guess at ambiguous input. Rather, it would be useful to accept common, unambiguous checksum formats and explicitly report anything that cannot be interpreted safely.

Closing

I ultimately got the workflow working, and rclone successfully verified the actual remote file contents using --download.

I intend to continue using rclone, and this experience hasn't changed my opinion of the project. Quite the opposite: I think this is an opportunity to make an already excellent tool more interoperable and easier to use in real-world archival workflows.

Thank you to the developers and contributors for the work that goes into rclone. It's a tool I genuinely appreciate, and I hope this suggestion is useful.

Hi, welcome to the forum.

Thanks for the detailed report. There are some low-hanging fruits there, that I have started to look into (e.g. the BOM tolerance). Others may take some more deliberation, and may deserve their own issues on github.

Regarding your point 1 (broader manifest compatibility) do you have something specific in mind, not covered by the later points?

Edit: Can you explain the background for the following?

Removing a leading # from certain directory names.

I have a pull request #10223 with some improvements. When build goes through it will upload beta versions in https://beta.rclone.org/branch/checksum-fileformat-fixes/

If you are able to try out the beta version, and report back, that would be helpful.

Notable fixes it does not include are general path normalization, i.e. the following two of your conversion steps still needs to be performed:

  • Converting Windows backslashes to Unix forward slashes.
  • Removing leading path separators such as / and */.

That should probably be a github issue.

Also haven't looked into the suggestion of more informative errors, if you have some examples that would help.

Any other concrete issues?

just fyi i forgot to include orignal version of teracopy was v 3.17. Just a personal note for now avoid v4 which had a very troubling start. but v 3.17 is rock solid and available for use and download if anyone interested in using that tool on hash manifest creation and evaluation with significant speed increases but as youve just read theres a few bumps in the road to watch out for.
cheers, PZ :smiling_face_with_sunglasses:

The # sign issue.
as i was debugging the issues one small step at a time since i really had nothing else to go on but 1000ss of sum not found but no idea why. the data was there - why wont it read it. usual debugging ensued is file privs - NO - look at rclone manifest format and basically just made them look as close as possible to each other. but it still failed.

finally out of desperation I removed a single folder at the head of all others called AC2AD42D9B41B877A0AE681D2BF872583CE64EFBA465339F76A6EAD478C7C893 #Acoustic Alchemy [CBR.320]/Acoustic Alchemy - 1987 - Red Dust & Spanish Lace/01 - Mr. Chow.mp3

I dont know if being first was an issue or if some otheer metadata thing is jumping in causing an issue but i just TRIED renaming it and all subsequent othr folders like it. about 100 and renamed it thinking maybe just maybe it had something to do with the issue.

to my amazement it worked and ran for the first time properly. why is this an issue - no idea.
Was it an issue with being the very first file or what exactly im not sure but that what happened and needs to be examined and tested.

I'm definitely NOT asking rclone to strip or modify these characters as they are path names. They are legitimate directory-name characters and should be preserved exactly as they were but rclone needs to accept them like () #@[] etc other weird characters. i know () pass fine but # had an issue. it should be examined if by chance this edge case came about because the file was the very first in manifest although thats just a theory.

regarding the topic of unix versus windows slashes.

rclone already has code that overlooks slash formats in the command line. i can type a hybrid filename mix if say for instance im on a PC and rcloning to a remote unix host. i can mix / and \ in the coommand line and it ignores it or normalizes it whichever. I was just hoping maybe something similar to could be done for manifestt processing.

teracopy has one other issue - it formats the pathname as *\full filename and path. AI told me that the * represents that the file is binary not that aits a filename wildcard. of coure AI could be wrong but this I didnt know previously but i figured if rclone can overlook wrong slashes in command line why not in manifest processing. a pretty simple transform could instantly transform the slashes in a single command line of like javascript path = path.replace(/\/g, "/"); or python path = path.replace("\", "/"). since this transform already happens a the command prompt is it possible to make a change like this in manifest processing? similarly, removing */ is a similarly tiny single command like $path = $path -replace '^*/', ''.

these are just suggestions and possibilities.

thanks randy

BROADER APPROACH TO SOME OF THIS....

let me propose an idea we had regarding rclone and manifests.

I think there's potentially a broader opportunity here beyond TeraCopy compatibility.

Rclone is already an exceptionally capable cross-platform file-management tool. One area where it could become even more useful is interoperability with checksum manifests generated by other operating systems and file-management applications.

There are several established checksum conventions and implementations across Windows, Linux and macOS. Unfortunately, differences in delimiters, path separators, text encoding, escaping and filename representation can make otherwise valid manifests difficult to exchange between applications.

My suggestion would be to consider a more flexible checksum-manifest parser that recognizes common formats and safely handles ordinary platform-specific variations.

I'm not suggesting support for every proprietary format ever created. Rather, I think supporting the most widely used conventions would make cross-platform verification considerably easier and reduce the need for manual manifest preprocessing.

TeraCopy happens to be my particular use case, and my archive provides a substantial real-world test environment. However, I suspect the underlying improvements could benefit a much wider group of rclone users.

I see this as an opportunity to strengthen rclone's position as a genuinely platform-independent data-management and verification tool.

I'd be happy to help test proposed changes against real-world manifests and provide representative examples of the variations I've encountered.

A note about the * prefix in checksum manifests

I've been looking more closely at the */ prefix I encountered while converting TeraCopy-generated SHA256 manifests.

I found that GNU Coreutils uses an established checksum convention in which the character immediately following the checksum separator indicates the input mode:

  • * indicates binary mode.

  • A space indicates text mode.

The filename follows that marker.

For example:

<64-character SHA256 hash> */Folder/Subfolder/file.m4b

Under that convention, the asterisk is a binary-mode indicator, while the forward slash begins the file path.

This raises an interesting possibility: what initially looked like an unusual TeraCopy-specific path prefix may actually be standard checksum notation combined with an absolute path.

I haven't yet confirmed that this is precisely how TeraCopy intends its output to be interpreted, but I thought the distinction was worth bringing up because stripping */ as though it were simply part of the filename could discard meaningful format information.

GNU Coreutils documentation:

MORE INFORMATIVE ERRORS IN MANIFEST PROCESSING...
I wanted to address this separately so you wouldn't have a single message 5 screens long.

One additional suggestion concerns checksum verification error messages.

The current error I encountered was:

ERROR : Not_(Just)_a_Mage_Lord_Isekai,_2.m4b: sum not found

That tells me something went wrong, but not exactly what. With large collections, having to investigate each failure individually can become quite time-consuming. This latest trouble came on a 256000 file manifest but there are maifests in the millions. editing these files can become quite troublesome because no one fixes a single folder in a quarter million file manifest and then reruns the whole thing for a whole day or even 2 to just process a few rogue files. BUT WHAT IF - in a selection of 1 million files there's a 1% failure rate. thats 10,000 files and that not a SMALL manifest edit. it an entire weekend and a log file with 10,000 entires all say SUM NOT FOUND. At these file quantaties this is now a big problem.

It would be helpful if rclone could distinguish between several situations:

  • File not found: The manifest references a file that doesn't exist at the destination.

  • Checksum entry not found: The file exists, but no matching entry was found in the manifest.

  • Malformed manifest entry: The line could not be parsed as a valid checksum record.

  • Checksum mismatch: The file was successfully hashed, but the calculated checksum differs from the manifest.

  • Unsupported manifest format: The file appears to contain checksum data, but its format isn't recognized.

Where practical, including the manifest filename and line number would also make troubleshooting much easier.

I'm not suggesting that every error needs a lengthy explanation. Even a concise, specific message would be a substantial improvement, particularly when processing hundreds of thousands of files.

I thought this was worth mentioning while we're looking at manifest interoperability.

BTW: i have access to 3 million files on 240TB of storage and would be happy to assist in testing in anyway.

cheers, PZ

That is correct, and accepted by rclone - even the existing version (before my beta). I assume the rooted path starting /is the actual problem here, although I haven't investigated it.

yes the leading slash is the demon in the mix on this. */ or / leading both are problems for manifest translation and operation.
cheers, pz

If this is an exact copy, it only has a single space separator between the hash and the path, which is invalid. Assuming it was just mistyped in the forum post, and there are two spaces, then it seem to work just fine in my tests.

I added a commit that makes it more lenient and "rclone-conventional" when considering the paths in the sum files. Your leading / paths should then work, and on Windows backslash separated paths should also work.

While the previous fixes were more of the "mechanical" kind, this is a bit more "opinionated".

Please take it for a spin, sounds like you have a setup to put it through quite the battle test... :smile:

(Make sure you use the newest version from https://beta.rclone.org/branch/checksum-fileformat-fixes/, at least the .10701 version number which is still running but will upload binaries within some minutes).

I would like to know why that is!

Yeah, me too... And some evidence. :slight_smile:

I did a quick test on a Windows machine. Generating checksum of a Visual Studio installation directory with 31 548 Files (5 538 Folders), 5,43 GB (5 837 644 953 bytes). I don't know how representative that is. Tried different tools, repeated several times in a row. Completely unscientific, not in an isolated environment, antivirus and other processes may disturb. The measured times varies a lot, and I haven't investigated any further than just measuring the wall time.

Rclone is crazy fast: Takes between 2 and 15 seconds, most often in the lower end:

Measure-Command { rclone hashsum sha256 --output-file rclone-hashsum.sha256 'C:\Program Files\Microsoft Visual Studio' }

TeraCopy (Code Sector TeraCopy 4.0.5), without writing the results to file, with default options for everything except hash algorithm, takes between 30 seconds and 2 minutes, most often in the higher end:

Measure-Command { Start-Process TeraCopy.exe -ArgumentList 'Test "C:\Program Files\Microsoft Visual Studio" /Close' -Wait }

FSUM (SlavaSoft Optimizing Checksum Utility - fsum 2.52.00337) takes typically around 30 seconds (some times an outlier takes several minutes):

Measure-Command { fsum.exe -sha256 -jm -d"C:\Program Files\Microsoft Visual Studio" -r * > fsum.sha256 }

I've merged @albertony 's changes to master now which means it will be in the latest beta in 15-30 minutes and released in v1.77

Please give them a go!