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

Repairing a repository where current is out of sync with revisions after restoring from backup

From: Shane Riddell <riddell.shane_at_gmail.com>
Date: Fri, 27 Jun 2008 08:43:05 -0400

I'm testing out backup recovery plans for a subversion repository using
FSFS. The documentation for backing up a repository warns that you need to
ensure that db/current is backed up before the revisions, or you have to be
prepared to manually repair the repository, as the db/current file might
point to revisions that either don't exist, or don't completely exist in the
backup. However, I've been unable to find a description of what a manual
repair entails.

(Note: I'm aware that svadmin recover in subversion 1.5 now has the ability
to fix this problem, but I cannot upgrade to that version yet. Using
hotcopy isn't a preferred option in this case either.)

I tried simulating this situation by deleting the last 4 revisions from a
test repository, so db/current references a head revision that doesn't
exist. As expected, svnadmin verify verified the repository up until the
point at which I deleted revisions.

To repair, I used svadmin dump to dump the repos up until the last revision
verified, created a new repository, loaded the dumpfile into the new repos,
verified the new repository, then moved it to replace the original (damaged)
one.

Is this an appropriate way to fix a repository restored from backup if the
db/current file wasn't backed up before the revisions?
Received on 2008-06-28 17:40:26 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.