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

Re: In regards to "missing db/revs, db/revprops and db/current files?" post on Collabnet

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Mon, 13 Oct 2008 02:49:48 -0500

On Oct 12, 2008, at 14:26, Tonte Pouncil wrote:

> Ryan Schmidt wrote:
>
>> Tonte Pouncil wrote:
>>
>> > I am emailing you in regards to the post "missing db/revs, db/
>> > revprops and db/current files?". I am having a very similar issue
>> > with my svn repository. I am missing the following files: 76, 78,
>> > 79, 80, and 83 in db/revs/ directory. However I am not missing any
>> > file in the db/revprops directory. I also tried to do incremental
>> > backups based on revision numbers that I do have; but that did not
>> > work either, as other revision files pointed back to the missing
>> > revision files.
>> >
>> > How do I recreate these missing files? How do I correct this
>> issue?
>>
>> If you do not have a backup of your repository, you probably cannot
>> recreate the missing revision files, or use those subsequent
>> revisions that refer back to them; the data is lost. You could write
>> a script to do an incremental dump of each revision in the
>> repository, ignoring errors. Then load these into a new repository
>> (being sure to ignore the UUID in the first dump so that a new UUID
>> is generated, since this will be a different repository.) This will
>> at least give you the data of those revisions not affected by the
>> missing revisions. And then be sure to set up a good backup strategy!
>
> Thanks for the advise. I have a few more question about your
> suggested approach.
>
> 1. What would a batch script look like for doing the incremental
> dump?

svnadmin dump /path/to/oldrepo -r1 > r1.dump
svnadmin dump /path/to/oldrepo -r2 --incremental > r2.dump
svnadmin dump /path/to/oldrepo -r3 --incremental > r3.dump
svnadmin dump /path/to/oldrepo -r4 --incremental > r4.dump
.
.
.

> 2. How do I ignore the UUID in the first dump?

You ignore it when you load it into the new repository:

svnadmin create /path/to/newrepo
svnadmin load /path/to/newrepo --ignore-uuid < r1.dump
svnadmin load /path/to/newrepo < r2.dump
svnadmin load /path/to/newrepo < r3.dump
svnadmin load /path/to/newrepo < r4.dump
.
.
.

> I wonder if I could I fake out subversion, when performing a dump,
> by changing the files that depend on the missing files to point
> some arbitrary existing file. Will this work?

Subversion stores revisions as differences against prior revisions.
So if you're missing revision 76, a future revision that you still
have may say something like "take the file foo.txt from revision 76
and change line 5 to bar". Without the data from revision 76, you
can't make that work.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-13 09:50:09 CEST

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

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