SVNAdmin Load Returns Checksum Mismatch

5,790

Solution 1

Possibilities include a corrupt repository, a dumpfile corrupted during transfer, or a hand-edited dumpfile (trying to change paths...?).

If you're trying to change paths, maybe any patching greedily touched revision content, vs just revision entry headings.

If you have no way of re-dumping and trying again (or if doing so has the same problem), try svndumpfilter to exclude that file and any others with problems.

To recover those files, you can very carefully patch the dumpfile to have the correct checksum (Text-content-md5?, but verify the file isn't corrupt), or get them from checkouts/working copies (or extract and reconstruct from the text and deltas in the dump).

Solution 2

Had this problem after filtering my dump with https://github.com/jasperlee108/svndumpfilterIN

Fixed with removing md5 checksums:

sed -i '/Text-copy-source-md5/d' your.dmp

However, there can possible be some consequences...

Share:
5,790
SidC
Author by

SidC

Desktop, web, business intelligence and mobile developer.

Updated on September 18, 2022

Comments

  • SidC
    SidC almost 2 years

    I'm trying to load a svn dumpfile onto my RHEL server. The dumpfile was loaded from our old Ubuntu server and I used svnadmin create reponame and then svnadmin load --quiet reponame < dumpfilename.

    After a short time, I receive the following message:

    svnadmin: Checksum mismatch,   
    file '/images/lang_cards/large/2001_Lang_Valentines_inside_large.jpg':
    expected:  97b1f37b81463ac88a3c2c18abfbb329
    actual:  944edbcc7684cb736eca5ed2c0d1c12c
    

    How can I bypass this error, to continue loading the dumpfile?

    Thanks!

    • Greg Petersen
      Greg Petersen over 12 years
      Could you please show us the exactly errors?
  • Jehy
    Jehy almost 9 years
    Why silient downvote?
  • Sebastian J.
    Sebastian J. over 7 years
    IMHO it's fair to use your approach if you know what you are doing (i.e. removing a password from the repo): Modify the dump and drop the lines Text-content-md5 and Text-content-sha1. (Obv. you risk having corrupted content)
  • TWiStErRob
    TWiStErRob over 3 years
    Thanks for the tip about the existence of the tool. I tried running svndumptool.py sanitize and got a tiny file with all contents anonymized to "random" hex numbers. When running sanitize -n -u -l -f it re-created a similar dump file, but didn't recalculate neither MD5 nor SHA1 checksums. I tried svndumptool.py check -A -v as well, and it just said "OK", even though svnadmin load fails on it with checksum mismatch.
  • TWiStErRob
    TWiStErRob over 3 years
    Beware: any processing with this tool removed Text-copy-source-md5 and Text-copy-source-sha1 for me.
  • TWiStErRob
    TWiStErRob over 3 years
    I needed to use this variant: sed -re '/^(Text-content-md5|Text-content-sha1|Text-copy-source-md5|‌​Text-copy-source-sha‌​1): /d' <patched.dump >nohash.dump. Note: using </> instead of -i sped things up significantly when running inside docker.