I had a problem with a corrupt repository today.
svn log gave me "Malformed file" errors even though svnadmin verify said everything was OK.
It's always bad when your source history is gone so I'll also post an answer in case it helps someone.
I had a problem with a corrupt repository today.
svn log gave me "Malformed file" errors even though svnadmin verify said everything was OK.
It's always bad when your source history is gone so I'll also post an answer in case it helps someone.
Backup your repository!
Note the last revision it was able to dump (eg. 99), the next one has the error (e.g. 100).
If it contains garbage or NULs you can fix it:
run "svnadmin dump REPOSPATH > nul" again - it should finish without errors
@laktak's solution work in most cases when props are corrupted, but not when the actual rev file as pointed by @jgifford25.
An ideal solution would be to:
svnadmin dump /path/to/currentrepo -r 0:99 --incremental > svnbackuptillvalid
svnadmin dump /path/to/currentrepo -r 101:HEAD --incremental > svnbackupafterinvalid
svnadmin create /path/to/newrepo
svnadmin load /path/to/newrepo < svnbackuptillvalid
Share the new Repo URL with a team or delete existing repo and use the same path.
Additionally, you can add valid changesets committed after Invalid revision.
svnadmin load /path/to/newrepo < svnbackupafterinvalid