You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Michael Guyver <mi...@gmail.com> on 2008/08/01 08:15:02 UTC
Recovering SVN repository
Hi everyone,
I have run a subversion repository on my server for around three years
but unfortunately bricked the latter when I tried to upgrade FC4 to
FC5. To cut a long story short, after backing-up the important data,
the tech guys in the data-centre tried and failed to install CentOS as
the disks were mis-reporting their sizes. I have now got the server
under my desk and have used TestDisk to restore the partition structure
sufficiently so I can read the svn data from it (as getting the data
sent to me from their tape backup would be quite a mission and cost
more £££).
Anyway, I have read the repository data from the disks but have a few
issues with recovering the repository.
The repository is running a BDB database
svnroot/format contains 3
svnroot/db/format contains 1
There are no point-in-time backups of the repository; this is it.
svnadmin --version (on my desktop where I'm trying to access the data)
returns 1.4.4 (r25188)
I've tried to run
svnadmin dump svnroot/db
but receive the following message:
svnadmin: Expected repository format '3' or '5'; found format '1'
I understand one route to solving this issue is to install an earlier
version of subversion. Sadly the server's disks really are so fsck'd
that I haven't been able to get to their svn* binaries to find out
their version, but going by installation date and the format number
'1', I've tried installing and building subversion-1.1.1, but when
running
svnbin-1.1.1$ ./svnadmin verify ~/svnroot/db
get the message
svn: Expected version '3' of repository; found version '1'
Well... guess I need to go further back in time? Please advise, only
I'm having some "frustrating" ~x( issues compiling earlier sources on
this FC8 machine.
I have located a 1.0.9 binary RPM and run an upgrade using --oldpackage
but also needed to use the --nodeps in order to make it complete
without dependency errors. Of course the binaries wouldn't run so I'm
back at CollabNet 1.4.4.
Any help would be very gratefully received.
Regards
Michael
PS Who'd have thought that running an off-site SVN repository on a
mirrored RAID disk would be such a liability?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Recovering SVN repository
Posted by Michael Guyver <mi...@gmail.com>.
2008/8/1 Ryan Schmidt <su...@ryandesign.com>:
> On Aug 1, 2008, at 05:10, Michael Guyver wrote:
>
> The portable way to move repositories from one computer to another is to run
> "svnadmin dump" on the one computer and "svnadmin load" on the other.
Yes, I'm just having trouble making that work with a Knoppix Live CD on the
damaged system, as it won't have the original SVN or BDB binaries used to
write the data either.
> Copying a repository directory can work if both machines have the same
> versions of BDB and the same processor architecture.
Fortunately they are both Intel x86-based machines although they have
different Fedora versions on them. The (dead) server was FC4, the desktop
is FC8.
> You can see what version of BDB the repository was using; see the FAQ:
>
> http://subversion.tigris.org/faq.html#divining-bdb-version
>
It appears that the BDB version used to write the data was v. 4.3 itself. I'm
compiling it as I write this and hope it will get me somewhat further.
Thanks very much for taking the time to reply, Ryan.
Regards,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Recovering SVN repository
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 1, 2008, at 05:10, Michael Guyver wrote:
> Ryan Schmidt wrote:
>
>> On Aug 1, 2008, at 03:15, Michael Guyver wrote:
>>
>>> I've tried to run
>>>
>>> svnadmin dump svnroot/db
>>>
>>> but receive the following message:
>>>
>>> svnadmin: Expected repository format '3' or '5'; found format '1'
>>
>> Don't use "svnadmin dump svnroot/db". Use "svnadmin dump svnroot".
>
> Thanks Ryan. When I try that with svnadmin 1.4.4 I get the message:
>
> svnadmin: Berkeley DB error for filesystem 'svnroot/db' while getting
> youngest revision (finding last entry):
> DB_RUNRECOVERY: Fatal error, run database recovery
> svnadmin: bdb: page 0: illegal page type or format
> svnadmin: bdb: PANIC: Invalid argument
> svnadmin: bdb: PANIC: fatal region error detected; run recovery
>
> I've installed BDB 4.6 and have tried
>
> db_recover -f -h svnroot/db
>
> which completes to 100% but the result remains the same and the error
> message is displayed.
>
> Given that the repository was running fine before the server problems,
> and wasn't being accessed at the time the server went down (I'm the
> only one with access), surely it should be recoverable? I should
> probably add that I simply tarballed svnroot/* and scp'd it across the
> wire to my desktop. Could that have introduced a problem?
The portable way to move repositories from one computer to another is
to run "svnadmin dump" on the one computer and "svnadmin load" on the
other. Copying a repository directory can work if both machines have
the same versions of BDB and the same processor architecture. If the
new machine has a newer version of BDB, it should be possible to
upgrade the repository to the new format. But it looks like if the
older version is < 4.3 and the newer version is >= 4.3 then you will
have the problem described here:
http://subversion.tigris.org/faq.html#bdb43-upgrade
You can see what version of BDB the repository was using; see the FAQ:
http://subversion.tigris.org/faq.html#divining-bdb-version
I don't use BDB repositories so I don't have personal experience with
any of this.
> If I run the db_verify command from the BDB distribution, the DB files
> all check-out OK except the revisions file, which gives this error:
>
> db_verify: Page 5: btree or recno page is of inappropriate type 0
> db_verify: Page 5: totally zeroed page
> db_verify: Page 5: record count incorrect: actual 0, in record 225
> db_verify: Page 6: btree or recno page is of inappropriate type 0
> db_verify: Page 6: totally zeroed page
> db_verify: Page 6: record count incorrect: actual 0, in record 225
> db_verify: Page 7: btree or recno page is of inappropriate type 0
> db_verify: Page 7: totally zeroed page
> db_verify: Page 7: record count incorrect: actual 0, in record 132
> db_verify: Page 1: bad record count: has 602 records, claims 1184
> db_verify: Page 4: unterminated leaf chain
> db_verify: /home/guyverm/svnroot/db/revisions: DB_VERIFY_BAD:
> Database verification failed
>
> I wonder whether this is caused by a mismatch between DBD
> versions, but if not, whether the revisions file is recoverable.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Recovering SVN repository
Posted by Michael Guyver <mi...@gmail.com>.
2008/8/1 Ryan Schmidt <su...@ryandesign.com>:
> On Aug 1, 2008, at 03:15, Michael Guyver wrote:
>>
>> I've tried to run
>>
>> svnadmin dump svnroot/db
>>
>> but receive the following message:
>>
>> svnadmin: Expected repository format '3' or '5'; found format '1'
>
> Don't use "svnadmin dump svnroot/db". Use "svnadmin dump svnroot".
>
Thanks Ryan. When I try that with svnadmin 1.4.4 I get the message:
svnadmin: Berkeley DB error for filesystem 'svnroot/db' while getting
youngest revision (finding last entry):
DB_RUNRECOVERY: Fatal error, run database recovery
svnadmin: bdb: page 0: illegal page type or format
svnadmin: bdb: PANIC: Invalid argument
svnadmin: bdb: PANIC: fatal region error detected; run recovery
I've installed BDB 4.6 and have tried
db_recover -f -h svnroot/db
which completes to 100% but the result remains the same and the error
message is displayed.
Given that the repository was running fine before the server problems,
and wasn't being accessed at the time the server went down (I'm the
only one with access), surely it should be recoverable? I should
probably add that I simply tarballed svnroot/* and scp'd it across the
wire to my desktop. Could that have introduced a problem?
If I run the db_verify command from the BDB distribution, the DB files
all check-out OK except the revisions file, which gives this error:
db_verify: Page 5: btree or recno page is of inappropriate type 0
db_verify: Page 5: totally zeroed page
db_verify: Page 5: record count incorrect: actual 0, in record 225
db_verify: Page 6: btree or recno page is of inappropriate type 0
db_verify: Page 6: totally zeroed page
db_verify: Page 6: record count incorrect: actual 0, in record 225
db_verify: Page 7: btree or recno page is of inappropriate type 0
db_verify: Page 7: totally zeroed page
db_verify: Page 7: record count incorrect: actual 0, in record 132
db_verify: Page 1: bad record count: has 602 records, claims 1184
db_verify: Page 4: unterminated leaf chain
db_verify: /home/guyverm/svnroot/db/revisions: DB_VERIFY_BAD:
Database verification failed
I wonder whether this is caused by a mismatch between DBD
versions, but if not, whether the revisions file is recoverable.
Regards
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Recovering SVN repository
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 1, 2008, at 03:15, Michael Guyver wrote:
> Anyway, I have read the repository data from the disks but have a few
> issues with recovering the repository.
>
> The repository is running a BDB database
> svnroot/format contains 3
> svnroot/db/format contains 1
> There are no point-in-time backups of the repository; this is it.
> svnadmin --version (on my desktop where I'm trying to access the data)
> returns 1.4.4 (r25188)
>
> I've tried to run
>
> svnadmin dump svnroot/db
>
> but receive the following message:
>
> svnadmin: Expected repository format '3' or '5'; found format '1'
Don't use "svnadmin dump svnroot/db". Use "svnadmin dump svnroot".
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org