ggambetta
ggambetta

Reputation: 3433

Loading a corrupted SVN dump file

Long story short, I had a 4.3 GB SVN dump file, and because of broken DVD sectors, now I have a 4 GB file and a 300 MB file.

svnadmin load has no problem with the first chunk, but I'm unable to recover the second one. I can't load it on top of the partially recovered one or in a new one, because there are paths created in the corrupted chunk in the middle that are now lost.

Is there any way to force svnadmin to ignore these files, so that at least I can recover whatever files were added in the last 300 MB dump?

Upvotes: 3

Views: 274

Answers (2)

user1556814
user1556814

Reputation: 583

There are good chances the 2 files have been splitted raw.

Any luck just "combining" back the two files ?

svnRepo=/home/svn
svnDump=/tmp/fullSVN.dump

cat svnDump.dump.part4GB svnDump.dump.part300MB > $svnDump

rm -rf $svnRepo
svnadmin create $svnRepo
svnadmin load $svnRepo < $svnDump

Upvotes: 1

bahrep
bahrep

Reputation: 30662

Search for a backup which contains those missing revisions svnadmin load errors-out on. If you have those revisions then you can repair the repository combining revision history using svnadmin dump and svnadmin load.

Otherwise, you can forget about the other 300mb dump unless you are willing to do a surgery on the dump file with a text editor.

Upvotes: 0

Related Questions