You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Dale Mellor <da...@rdmp.org> on 2010/06/05 13:20:54 UTC

How to recover a very old repository?

I've recently pulled an old SVN repository off a disk image from a
server I had many moons ago, and now have the repository on a local file
system.  Whenever I try to do anything, SVN complains that it is format
'2' instead of '3' or '5'.  What can I do to recover a working tree of
whatever is in there?

Re: How to recover a very old repository?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 6, 2010, at 05:03, Dale Mellor wrote:

> Thanks, that was useful information.  I worked out that I was using
> subversion-0.33.1.  I wouldn't have thought the architecture was a
> problem as I'm still using an x86-32 class processor (let's be honest,
> processor development hit the buffers when the 3GHz Pentium came
> out...), but I can't get Berkeley DB to work.  It seems I need an
> eclectic mix of versions of libdb[234], but everything I've tried fails
> to read the DB files.

You should be able to figure out exactly which version of BerkeleyDB you need for this repository by following these instructions:

http://subversion.apache.org/faq.html#divining-bdb-version



Re: How to recover a very old repository?

Posted by Dale Mellor <da...@rdmp.org>.
On Sun, 2010-06-06 at 10:27 +0200, Erik Huelsmann wrote:
> Hi Dale,
> 
> On Sun, Jun 6, 2010 at 9:49 AM, Dale Mellor <da...@rdmp.org> wrote:
> > On Sat, 2010-06-05 at 17:15 -0400, Karl Fogel wrote:
> >> Dale Mellor <da...@rdmp.org> writes:
> >> >I've recently pulled an old SVN repository off a disk image from a
> >> >server I had many moons ago, and now have the repository on a local file
> >> >system.  Whenever I try to do anything, SVN complains that it is format
> >> >'2' instead of '3' or '5'.  What can I do to recover a working tree of
> >> >whatever is in there?
> 
> 
> I found that 'format 2' repositories have been created between Aug
> 2003 and Nov 2003. Which seriously limits the number of releases that
> you could have been running at the time. However, if you changed
> architectures since then, I don't know how to help you: BDB files are
> architecture dependent and non-portable. If you still have
> availability of a compatible architecture, you could build one of the
> very old releases from source to recover your repository. If that
> succeeds, I would create a dumpfile instead of a checkout: those can
> be loaded in today's Subversion.

Thanks, that was useful information.  I worked out that I was using
subversion-0.33.1.  I wouldn't have thought the architecture was a
problem as I'm still using an x86-32 class processor (let's be honest,
processor development hit the buffers when the 3GHz Pentium came
out...), but I can't get Berkeley DB to work.  It seems I need an
eclectic mix of versions of libdb[234], but everything I've tried fails
to read the DB files.

All I can say is I didn't use subversion very long, moving on as soon as
TLA came out, and now three or four generations on I'm using GIT; I'll
never look back again!  (At work the clowns are still using CVS...)

Thanks for your help,
Dale


Re: How to recover a very old repository?

Posted by Erik Huelsmann <eh...@gmail.com>.
Hi Dale,

On Sun, Jun 6, 2010 at 9:49 AM, Dale Mellor <da...@rdmp.org> wrote:
> On Sat, 2010-06-05 at 17:15 -0400, Karl Fogel wrote:
>> Dale Mellor <da...@rdmp.org> writes:
>> >I've recently pulled an old SVN repository off a disk image from a
>> >server I had many moons ago, and now have the repository on a local file
>> >system.  Whenever I try to do anything, SVN complains that it is format
>> >'2' instead of '3' or '5'.  What can I do to recover a working tree of
>> >whatever is in there?


I found that 'format 2' repositories have been created between Aug
2003 and Nov 2003. Which seriously limits the number of releases that
you could have been running at the time. However, if you changed
architectures since then, I don't know how to help you: BDB files are
architecture dependent and non-portable. If you still have
availability of a compatible architecture, you could build one of the
very old releases from source to recover your repository. If that
succeeds, I would create a dumpfile instead of a checkout: those can
be loaded in today's Subversion.


Bye,


Erik.

Re: How to recover a very old repository?

Posted by Dale Mellor <da...@rdmp.org>.
On Sat, 2010-06-05 at 17:15 -0400, Karl Fogel wrote:
> Dale Mellor <da...@rdmp.org> writes:
> >I've recently pulled an old SVN repository off a disk image from a
> >server I had many moons ago, and now have the repository on a local file
> >system.  Whenever I try to do anything, SVN complains that it is format
> >'2' instead of '3' or '5'.  What can I do to recover a working tree of
> >whatever is in there?
> 
> Can you post an exact command and error message, please?

# svnadmin verify .
svnadmin: Expected repository format '3' or '5'; found format '2'


# svn co file:///mnt/data/hold/svn test
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///mnt/data/hold/svn'
svn: Expected repository format '3' or '5'; found format '2'



>   Also, what platform was the repository created on, 

DIY Linux OS circa 2003 (would have been the latest SVN at the time,
compiled from sources).

> and what platform are you now trying to recover the data on?

Ubuntu 10.04, SVN-1.6.6.



> If you could show us the contents of the 'format' file in the top level
> of the repository, 

# cat format
2



> and maybe an 'ls -lR' of the whole repository (that
> is, a completely expanded listing of its files and directories) that
> would help too.

.:
total 16
drwxr-xr-x 2 root root   48 2003-09-27 17:42 dav
drwxr-xr-x 2 root root 7744 2004-06-27 11:26 db
-rw-r--r-- 1 root root    2 2003-09-27 17:42 format
drwxr-xr-x 2 root root  232 2003-09-27 17:42 hooks
drwxr-xr-x 2 root root   72 2003-09-27 17:42 locks
-rw-r--r-- 1 root root  376 2003-09-27 17:42 README.txt

./dav:
total 0

./db:
total 452852
-rw-r--r-- 1 root root    536576 2010-05-27 17:38 changes
-rw-r--r-- 1 root root      8192 2010-05-27 17:38 copies
-rw-r--r-- 1 root root      8192 2003-09-27 17:42 __db.001
-rw-r--r-- 1 root root    270336 2003-09-27 17:42 __db.002
-rw-r--r-- 1 root root    327680 2003-09-27 17:42 __db.003
-rw-r--r-- 1 root root    737280 2003-09-27 17:42 __db.004
-rw-r--r-- 1 root root     16384 2003-09-27 17:42 __db.005
-rw-r--r-- 1 root root      1282 2003-09-27 17:42 DB_CONFIG
-rw-r--r-- 1 root root   1045949 2003-09-27 17:43 log.0000000001
-rw-r--r-- 1 root root   1046226 2003-09-27 17:43 log.0000000002
-rw-r--r-- 1 root root   1046149 2003-09-27 17:43 log.0000000003
-rw-r--r-- 1 root root   1048013 2003-09-27 17:43 log.0000000004
-rw-r--r-- 1 root root   1048316 2003-09-27 17:43 log.0000000005
  .
  .  <200 lines removed>
  .
-rw-r--r-- 1 root root   1048470 2003-12-20 14:36 log.0000000227
-rw-r--r-- 1 root root   1048545 2004-06-27 11:26 log.0000000228
-rw-r--r-- 1 root root    259345 2010-05-27 17:38 log.0000000229
-rw-r--r-- 1 root root    368640 2010-05-27 17:38 nodes
-rw-r--r-- 1 root root    323584 2010-05-27 17:38 representations
-rw-r--r-- 1 root root      8192 2010-05-27 17:38 revisions
-rw-r--r-- 1 root root 221298688 2010-05-27 17:38 strings
-rw-r--r-- 1 root root     24576 2010-05-27 17:38 transactions
-rw-r--r-- 1 root root      8192 2010-05-27 17:38 uuids

./hooks:
total 20
-rw-r--r-- 1 root root 1286 2003-09-27 17:42 post-commit.tmpl
-rw-r--r-- 1 root root 1475 2003-09-27 17:42 post-revprop-change.tmpl
-rw-r--r-- 1 root root 2093 2003-09-27 17:42 pre-commit.tmpl
-rw-r--r-- 1 root root 1952 2003-09-27 17:42 pre-revprop-change.tmpl
-rw-r--r-- 1 root root 1377 2003-09-27 17:42 start-commit.tmpl

./locks:
total 4
-rw-r--r-- 1 root root 460 2003-09-27 17:42 db.lock


Re: How to recover a very old repository?

Posted by Karl Fogel <kf...@red-bean.com>.
Dale Mellor <da...@rdmp.org> writes:
>I've recently pulled an old SVN repository off a disk image from a
>server I had many moons ago, and now have the repository on a local file
>system.  Whenever I try to do anything, SVN complains that it is format
>'2' instead of '3' or '5'.  What can I do to recover a working tree of
>whatever is in there?

Can you post an exact command and error message, please?  Also, what
platform was the repository created on, and what platform are you now
trying to recover the data on?

If you could show us the contents of the 'format' file in the top level
of the repository, and maybe an 'ls -lR' of the whole repository (that
is, a completely expanded listing of its files and directories) that
would help too.

-Karl