3

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!

1
  • Could you please show us the exactly errors?
    – quanta
    Dec 17, 2011 at 17:33

3 Answers 3

2

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).

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...

3
  • Why silient downvote?
    – Jehy
    Aug 10, 2015 at 7:30
  • 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) Oct 30, 2016 at 19:46
  • 1
    I needed to use this variant: sed -re '/^(Text-content-md5|Text-content-sha1|Text-copy-source-md5|Text-copy-source-sha1): /d' <patched.dump >nohash.dump. Note: using </> instead of -i sped things up significantly when running inside docker.
    – TWiStErRob
    Mar 21, 2021 at 20:34
0

I recommend the use of svndumptool script

  • to validate a dump with the check command
  • to fix platform specific end-of-lines (eolfix) and generating correct check sums
  • to split or merge dumps
  • and much more

In your specific case, the command sanitize should fix check sums in your dump. But then, a deep check of the loaded repository content is required.

Really a must-have tool for advanced Subversion repository dump manipulations.

2
  • 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
    Mar 21, 2021 at 20:30
  • Beware: any processing with this tool removed Text-copy-source-md5 and Text-copy-source-sha1 for me.
    – TWiStErRob
    Mar 21, 2021 at 20:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .