You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Gregory Youngblood <gr...@netio.org> on 2005/10/20 06:51:27 UTC

Help needed to recover BDB repos

I'm running SuSE 9.3 right now. Previously I ran an older version of
SuSE. Currently I have svn 1.1.3. I've also compiled from source 1.2.3
(all-static, with bdb 4.1.25). I think the previous system had svn
1.0.??? but I'm not sure.

I have two older repos that I believe were created with db 4.1 (based on
FAQ, checking bytes in log file with od tool).

SVN as installed on 9.3 will not dump or recover those repos. So I
downloaded the latest SVN and bdb 4.1.25 tar balls and built static
version of SVN. Still can't read repos, and still getting error telling
me to run recover. I recovered the original files from backup and still
get same error. svnadmin recover halts with error telling me to do
db_recover. 

I ran db_recover on one of them and get a panic telling me:
db_recover -c -v -h /path/to/oldrepo/SVN/db

db_recover: unable to join the environment
db_recover: Finding last valid log LSN: file: 444 offset 655229
db_recover: Recovery starting from [1][28]
db_recover: DB_LOGC->get: invalid log record header
db_recover: PANIC: Input/output error
db_recover: fatal region error detected; run recovery
db_recover: fatal region error detected; run recovery
db_recover: DB_ENV->open: DB_RUNRECOVERY: Fatal error, run database
recovery


I ran db_recover on the other repo, and it looks like it completed OK
(db_recover -c -v -h /path/to/repo/db). 

db_recover: Finding last valid log LSN: file: 50 offset 109170
db_recover: Recovery starting from [1][28]
db_recover: Recovery complete at Wed Oct 19 23:44:24 2005
db_recover: Maximum transaction ID 80013b29 Recovery checkpoint
[50][109170]
db_recover: Recovery complete at Wed Oct 19 23:44:24 2005
db_recover: Maximum transaction id 80000000 Recovery checkpoint
[50][109170]

After this, svnadmin dump on the repaired repo db now produces the
error:

Please wait; recovering the repository may take some time...
svnadmin: DB_RUNRECOVERY: Fatal error, run database recovery
svnadmin:
bdb: /export/storage/svnroot/export/SVN-orig/db/log.0000000051: log file
open failed: No such file or directory
svnadmin: bdb: PANIC: No such file or directory
svnadmin: bdb: DB_ENV->log_put: 51: DB_RUNRECOVERY: Fatal error, run
database recovery

--

Ignoring the obvious, that I should have done an svnadmin dump when I
backed up the old repository, is there anything I can do to get my
repository back? I really need to get it back. My next step will be to
install an older version of SuSE and hopefully be able to dump the data
from that. I'm hoping there will be an easier method.

Follow up question, I'm assuming the fsfs back end will be much more
stable and less prone to (nonrecoverable?) errors than the bdb version.
Is it? If you copy a repos from an old machine to a newer one (older SVN
to newer SVN), will the old fsfs data be read by the newer version of
svn? Or will it have to go through a dump/load to upgrade as well?

Thanks,
Greg

Re: Help needed to recover BDB repos

Posted by Paul Koning <pk...@equallogic.com>.
>>>>> "Gregory" == Gregory Youngblood <gr...@netio.org> writes:

 Gregory> I can accept a performance hit for not upgrading. This
 Gregory> backwards compatibility is important to me. I realize svn is
 Gregory> not cvs, however cvs has been around for quite a while. And,
 Gregory> I don't think it has seen too many changes to the file
 Gregory> format over the years (RCS files right?). This means I can
 Gregory> recover old cvs repos from backups and almost always just
 Gregory> drop them into a current system and use them again. That's
 Gregory> very powerful (and comforting).

Yes.  Given a sufficiently primitive storage method -- and what CVS
does certainly qualifies as very primitive -- that can be true.  You
do pay a bit of a price for having a source control system with proper
database semantics, rather than one that only barely works at all.

	 paul


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Help needed to recover BDB repos

Posted by Gregory Youngblood <gr...@netio.org>.
On Thu, 2005-10-20 at 12:16 +0200, Ryan Schmidt wrote:

> On Oct 20, 2005, at 08:51, Gregory Youngblood wrote:
> 
> > Follow up question, I'm assuming the fsfs back end will be much  
> > more stable and less prone to (nonrecoverable?) errors than the bdb  
> > version. Is it?
> 
> Based on my observing posts on this list for 8 months, yes.


That's good - I'm glad to hear this.

> 
> 
> > If you copy a repos from an old machine to a newer one (older SVN  
> > to newer SVN), will the old fsfs data be read by the newer version  
> > of svn?
> 
> Currently, yes, Subversion 1.2 can read FSFS repositories made with  
> Subversion 1.1 (the first version in which FSFS was available)  
> without issue.
> 
> > Or will it have to go through a dump/load to upgrade as well?
> 
> You get a performance improvement if you dump and load when going  
> from 1.1 to 1.2, because 1.2 has a new delta format, but the dump and  
> load is not required.


I can accept a performance hit for not upgrading. This backwards
compatibility is important to me. I realize svn is not cvs, however cvs
has been around for quite a while. And, I don't think it has seen too
many changes to the file format over the years (RCS files right?). This
means I can recover old cvs repos from backups and almost always just
drop them into a current system and use them again. That's very powerful
(and comforting). 

Either way, you can bet I'll be adding an svnadmin dump to my backup
process once (if?) I get these recovered.

Thanks,
Greg

Re: Help needed to recover BDB repos

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 20, 2005, at 08:51, Gregory Youngblood wrote:

> Follow up question, I'm assuming the fsfs back end will be much  
> more stable and less prone to (nonrecoverable?) errors than the bdb  
> version. Is it?

Based on my observing posts on this list for 8 months, yes.


> If you copy a repos from an old machine to a newer one (older SVN  
> to newer SVN), will the old fsfs data be read by the newer version  
> of svn?

Currently, yes, Subversion 1.2 can read FSFS repositories made with  
Subversion 1.1 (the first version in which FSFS was available)  
without issue.

> Or will it have to go through a dump/load to upgrade as well?

You get a performance improvement if you dump and load when going  
from 1.1 to 1.2, because 1.2 has a new delta format, but the dump and  
load is not required.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org