[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Rescuing a repository

From: Max Bowsher <maxb_at_ukf.net>
Date: 2004-05-14 17:03:24 CEST

Marc Haisenko wrote:
> On Friday 14 May 2004 15:15, Edmund Horner wrote:
>> Edmund Horner wrote:
>> PS. I just ran through the process on one of my own repositories (one
>> which wasn't working out anyway... I'm not always as reckless as I sound
>> :-) and it seems to go ok.
>> BUT I forgot to mention: make a backup first! The file containing the
>> checkums is db/representations. Not sure if you need to backup other
>> files if you're simply going to modify 32 innocuous data bytes.
> When experimenting with sensible data I normally do even two backups... better
> to be over-careful here ^_^
>> In my case the checksum occurred twice in the file. Not sure if that's
>> always the case. The checksum is stored as 16 binary bytes (not as 32
>> hex digits).
>> When this happened to me, the advice was to dump the file using the BDB
>> dump utility, edit it there, and then recreate the file. That didn't
>> work for me so I used a hex editor.
> This helps a lot, thanks... luckily I have an excellent binary editor (biew)
> at hand :-) I'll try this...

Marc, before you try hunting through bdb files for the checksum, try:

db_dump -kp db/representations > reps.dump
your-favourite-editor reps.dump

The file should contain lots of lines like this:
 ((fulltext 1 5 (md5 16 `\f4~\d3\fc\b5\0b\b9Q\aa\c2\af\9e\86Zc)) 2 3g)
 ((delta 0 (md5 16 \e0\a8\b1"\ac\e2\ab\1d\a1\a2\c6}\deE\19\a0)) (1 0 ((svndiff 1 0 n7) 2 20 d3)))

Search for the pair of lines:
 ((.....some data.....)

(Where 4pi is the representation from your error message)
Now, edit the md5sum to \00 repeated 16 times, and save the file

mv db/representations db/representations.old
db_load db/representations < reps.dump

You should now be able to dump the repository, but be aware that part of the problem revision will be corrupt.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 14 17:04:28 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.