6

I'm using Subversion just for private synchronization between a laptop and a desktop. Recently I discovered that several ASCII files and several binary files were corrupted. Instead of the expected contents, a long series of file names and directory structures was inserted, with some truncated stray strings of binary data.

I have never encountered an update or commit reply indicating the repository is corrupt, there are no file system or hardware issues on the two clients that have used the Subversion server.

My question is, is there some way I can determine when the files started to go corrupt in the repo, and then revert the files from that old commit where they were still intact?

jasonwryan
  • 71,734
  • 34
  • 193
  • 226
ioctlvoid
  • 451
  • 5
  • 13
  • 1
    Pick a corrupted file and check it's revisions in the repo browser. What's with the filesize, did it remain similar? – ott-- Jan 24 '13 at 16:36
  • 1
    If it's a text file, try `svn annotate` on it – sendmoreinfo Jan 24 '13 at 17:20
  • What version do you use on the client- and server-side? Does [`svnadmin dump /path/to/your/repo > dump.svn`](http://svnbook.red-bean.com/nightly/en/svn.ref.svnadmin.c.dump.html) work without problems? – qbi Jan 24 '13 at 19:35
  • 2
    As a side note, using a decentralized version control system (mercurial, git...) might be better. – peterph Jan 25 '13 at 09:34
  • @peterph, fully agree. But that doesn't solve the bind OP is in right now. And whatever caused this could in principle screw up any other VCS. – vonbrand Jan 25 '13 at 12:29
  • @vonbrand I know, this was meant as a suggestion for the future - the big advantage of DVCS of every node holding more or less complete history might help in some cases like this - it's a bit more difficult to pollute **all** repository clones. – peterph Jan 25 '13 at 22:45

1 Answers1

1

I'd try svnadmin verify on the repository. That might at least give you an idea of where the corruption is. I've performed repo surgery in the past to fix corruption, but it's always a bit dicey.

lmcanavals
  • 1,174
  • 1
  • 10
  • 22
durin42
  • 248
  • 2
  • 4