You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jeff Kowalczyk <jt...@yahoo.com> on 2004/09/20 17:03:59 UTC

1.1.0_rc2 update db version 4.2 on existing repositories

I installed subversion-1.1.0_rc2 on Gentoo Linux. My previous repositories
(last used with 1.0.6) are now giving an error message about the Berkely
Database version:

> svn commit  --message="Update docstrings"
> svn: Commit failed (details follow):
> svn: Unable to open an ra_local session to URL
> svn: Unable to open repository
> 'file:///home/myuser/svn/acme/trunk/acmeutil'
> svn: Berkeley DB error while opening environment for filesystem
> /home/myuser/svn/acme/db: Invalid argument svn: bdb: Program version 4.2
> doesn't match environment version

Gentoo Linux allows several different versions of programs to be installed
simultaneously. On this laptop, I have package 'db' versions:

4.2.52_p2
4.1.25_p1-r4
4.0.14-r3
1.85-r2

installed. It would seem that the error message indicates some sort of
update procedure on each repository to convert database storage formats.
Alternatively, I wouldn't mind doing a dump-restore on each, if someone
can spell out the steps.

Further alternative is if anyone can suggest a procedure for dumping the
existing repositories, and importing them back to new fsfs repositories
enabled by 1.1. I'm hoping to move all these small repositories to fsfs
anyway. 

Any suggestions? Thanks.




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

Re: 1.1.0_rc2 update db version 4.2 on existing repositories

Posted by Russ Brown <su...@dot4dot.plus.com>.
On Mon, 20 Sep 2004 13:40:02 -0400, Jeff Kowalczyk <jt...@yahoo.com> wrote:

>> Further alternative is if anyone can suggest a procedure for dumping the
>> existing repositories, and importing them back to new fsfs repositories
>> enabled by 1.1. I'm hoping to move all these small repositories to fsfs
>> anyway.

I actually did this last night.

First you need to create your fsfs repository (somewhere separate from  
your existing one). My original repository was in /var/svn/repos. So I did  
this:

svnadmin create --fs-type fsfs /var/svn/repos2

Then you can do the transfer in one operation:

cd /var/svn

svnadmin dump repos | svnadmin load repos2

After that I just had to make sure the permissions were right on the new  
repository, moved the old one away and put the new one in its place.  
Everything else worked fine with the new repository.

Hope this helps.

-- 

Russ Brown

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

Re: 1.1.0_rc2 update db version 4.2 on existing repositories

Posted by Jeff Kowalczyk <jt...@yahoo.com>.
On Mon, 20 Sep 2004 13:03:59 -0400, Jeff Kowalczyk wrote:
> It would seem that the error message indicates some sort of update
> procedure on each repository to convert database storage formats.

I found the command
# db4.2_upgrade
usage: db_upgrade [-NsV] [-h home] [-P password] db_file ...

But which of the repository/db files is the file to upgrade? All of the
__db.??? files?

/home/myuser/svn/acme/db $ ls -1
DB_CONFIG
__db.001
__db.002
__db.003
__db.004
__db.005
changes
copies
log.0000000001
log.0000000002
log.0000000003
log.0000000004
log.0000000005
log.0000000006
nodes
representations
revisions
strings
transactions
uuids


> Alternatively,I wouldn't mind doing a dump-restore on each, if someone
> can spell out the steps.
> 
> Further alternative is if anyone can suggest a procedure for dumping the
> existing repositories, and importing them back to new fsfs repositories
> enabled by 1.1. I'm hoping to move all these small repositories to fsfs
> anyway.
> 
> Any suggestions? Thanks.


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

Re: 1.1.0_rc2 update db version 4.2 on existing repositories

Posted by Max Bowsher <ma...@ukf.net>.
Jeff Kowalczyk wrote:
> Max Bowsher wrote:
>> The recommended procedure for moving between BDB versions is to
>> "svnadmin dump" using a svnadmin linked to the old bdb version, and
>> "svnadmin load" using a svnadmin linked to the new bdb version. There
>> are other ways in some circumstances, but this is the simple,
>> recommended, all-purpose way to do it.
>
> I'm taking your advice and trying to build a separate subversion-1.0.6
> (the last version used in which a commit was made) to do the 'svnadmin
> dump' step, then use the currently installed subversion-1.1.0_rc2 linked
> against BerkelyDB4.2 or fsfs to do the svnadmin load.
>
> Is there any way to tell which BDB version the repositor(ies) are
> expecting? I want to pass --with-berkelydb= to the 1.0.6 configure script.
>
> But the only information I have to go on is the error message:
>
> $ svnadmin dump acme
> svn: Berkeley DB error while opening environment for filesystem acme/db:
> Invalid argument
> svn: bdb: Program version 4.2 doesn't match environment version
>
> What does that 'environment version' refer to? I presume it isn't
> environment variables.

A berkeley DB 'environment' consists of the __db.* files which are mmaped 
into processes using the database.

The version of BDB is coded into these.

> Below is the package file list for the various db4 versions installed on
> my system. What is the argument I should pass to ./configure
> --with-berkely-db= ?
>
> Alternatively, can I just use one of the existing db4 dump commands on the
> repository (how?), or is it mandatory to use 'svnadmin dump'? My
> repositories are all in /home/myuser/svn/repos1 , repos2 , etc.

Actually, it is possible to use the db_dump tools to get out of this 
situation, without recompiling subversion.

It's a little fiddly though - read carefully! :-)

$ svnadmin create newrepos
$ cd newrepos/db
$ rm *s __db.* log.*

Yes, we really did intend to delete a huge chunk of the new repository!

$ cd ../..
$ cd oldrepos/db
$ for dbfile in *s; do
> db4.1_dump $dbfile | db4.2_load -h ../../newrepos/db $dbfile
> done

OK, we just used the fact that the database files are the only ones ending 
in the letter s to iterate over them, transferring them from the old format 
to the new format. I'm assuming your existing repositories are using db 4.1 
here. Test this before hand by trying "db4_stat -e" and "db4.1_stat -e" (run 
in directory oldrepos/db), and seeing which one works.

$ cd ../..
$ svnadmin verify newrepos

Assuming that worked, copy across your hooks, set up any permissions you 
need, and it's done.


Max.





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

Re: 1.1.0_rc2 update db version 4.2 on existing repositories

Posted by Jeff Kowalczyk <jt...@yahoo.com>.
Max Bowsher wrote:
> The recommended procedure for moving between BDB versions is to
> "svnadmin dump" using a svnadmin linked to the old bdb version, and
> "svnadmin load" using a svnadmin linked to the new bdb version. There
> are other ways in some circumstances, but this is the simple,
> recommended, all-purpose way to do it.

I'm taking your advice and trying to build a separate subversion-1.0.6
(the last version used in which a commit was made) to do the 'svnadmin
dump' step, then use the currently installed subversion-1.1.0_rc2 linked
against BerkelyDB4.2 or fsfs to do the svnadmin load.

Is there any way to tell which BDB version the repositor(ies) are
expecting? I want to pass --with-berkelydb= to the 1.0.6 configure script.

But the only information I have to go on is the error message:

$ svnadmin dump acme
svn: Berkeley DB error while opening environment for filesystem acme/db:
Invalid argument
svn: bdb: Program version 4.2 doesn't match environment version

What does that 'environment version' refer to? I presume it isn't
environment variables.

Below is the package file list for the various db4 versions installed on
my system. What is the argument I should pass to ./configure
--with-berkely-db= ?

Alternatively, can I just use one of the existing db4 dump commands on the
repository (how?), or is it mandatory to use 'svnadmin dump'? My
repositories are all in /home/myuser/svn/repos1 , repos2 , etc.

Thanks.

$ qpkg sys-libs/db-4 -l
sys-libs/db-4.2.52_p2 *
CONTENTS:
/usr
/usr/bin
/usr/bin/db4.2_checkpoint
/usr/bin/db4.2_deadlock
/usr/bin/db4.2_upgrade
/usr/bin/db4.2_archive
/usr/bin/db4.2_dump
/usr/bin/db4.2_load
/usr/bin/db4.2_stat
/usr/bin/db4.2_printlog
/usr/bin/db4.2_recover
/usr/bin/db4.2_verify
/usr/lib
/usr/lib/libdb_cxx-4.2.a
/usr/lib/libdb-4.2.la
/usr/lib/libdb-4.2.so
/usr/lib/libdb_cxx-4.2.la
/usr/lib/libdb_cxx-4.2.so
/usr/lib/libdb_cxx.a -> libdb_cxx-4.2.a 1092695681
/usr/lib/libdb.so -> libdb-4.2.so 1092695681
/usr/lib/libdb-4.2.a
/usr/sbin
/usr/sbin/berkeley_db42_svc
/usr/include
/usr/include/db4.2
/usr/include/db4.2/db.h
/usr/include/db4.2/db_185.h
/usr/include/db4.2/db_cxx.h
/usr/include/db_185.h -> db4.2/db_185.h 1092695682
/usr/lib/libdb_cxx.so -> libdb_cxx-4.2.so 1092695682
/usr/lib/libdb.a -> libdb-4.2.a 1092695682
/usr/include/db.h -> db4.2/db.h 1092695682

sys-libs/db-4.1.25_p1-r4 *
CONTENTS:
/usr
/usr/bin
/usr/bin/db4.1_recover
/usr/bin/db4.1_checkpoint
/usr/bin/db4.1_verify
/usr/bin/db4.1_printlog
/usr/bin/db4.1_dump
/usr/bin/db4.1_load
/usr/bin/db4.1_stat
/usr/bin/db4.1_upgrade
/usr/bin/db4.1_archive
/usr/bin/db4.1_deadlock
/usr/lib
/usr/lib/libdb_cxx-4.1.a
/usr/lib/libdb-4.1.la
/usr/lib/libdb-4.1.so
/usr/lib/libdb_cxx.so -> libdb_cxx-4.1.so 1087736021
/usr/lib/libdb.a -> libdb-4.1.a 1087736021
/usr/lib/libdb_cxx-4.1.la
/usr/lib/libdb_cxx-4.1.so
/usr/lib/libdb_cxx.a -> libdb_cxx-4.1.a 1087736021
/usr/lib/libdb.so -> libdb-4.1.so 1087736021
/usr/lib/libdb-4.1.a
/usr/sbin
/usr/sbin/berkeley_db41_svc
/usr/include
/usr/include/db.h -> db4.1/db.h 1087736021
/usr/include/db4.1
/usr/include/db4.1/db.h
/usr/include/db4.1/cxx_except.h
/usr/include/db4.1/cxx_common.h
/usr/include/db4.1/db_185.h
/usr/include/db4.1/db_cxx.h
/usr/include/db_185.h -> db4.1/db_185.h 1087736021

sys-libs/db-4.0.14-r3 *
CONTENTS:
/usr
/usr/bin
/usr/bin/db4_checkpoint
/usr/bin/db4_dump
/usr/bin/db4_load
/usr/bin/db4_stat
/usr/bin/db4_upgrade
/usr/bin/db4_verify
/usr/bin/db4_deadlock
/usr/bin/db4_archive
/usr/bin/db4_printlog
/usr/bin/db4_recover
/usr/lib
/usr/lib/libdb_cxx-4.0.a
/usr/lib/libdb-4.0.la
/usr/lib/libdb-4.0.so
/usr/lib/libdb_cxx-4.0.la
/usr/lib/libdb_cxx-4.0.so
/usr/lib/libdb_cxx.a -> libdb_cxx-4.0.a 1086112209
/usr/lib/libdb.so -> libdb-4.0.so 1086112209
/usr/lib/libdb-4.0.a
/usr/sbin
/usr/sbin/berkeley_db40_svc
/usr/include
/usr/include/db4
/usr/include/db4/db.h
/usr/include/db4/cxx_except.h
/usr/include/db4/cxx_common.h
/usr/include/db4/db_185.h
/usr/include/db4/db_cxx.h
/usr/include/db.h -> db4/db.h 1086112209
/usr/include/db_185.h -> db4/db_185.h 1086112209
/usr/lib/libdb_cxx.so -> libdb_cxx-4.0.so 1086112209
/usr/lib/libdb.a -> libdb-4.0.a 1086112209




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

Re: 1.1.0_rc2 update db version 4.2 on existing repositories

Posted by Max Bowsher <ma...@ukf.net>.
Jeff Kowalczyk wrote:
> I installed subversion-1.1.0_rc2 on Gentoo Linux. My previous repositories
> (last used with 1.0.6) are now giving an error message about the Berkely
> Database version:
>
>> svn commit  --message="Update docstrings"
>> svn: Commit failed (details follow):
>> svn: Unable to open an ra_local session to URL
>> svn: Unable to open repository
>> 'file:///home/myuser/svn/acme/trunk/acmeutil'
>> svn: Berkeley DB error while opening environment for filesystem
>> /home/myuser/svn/acme/db: Invalid argument svn: bdb: Program version 4.2
>> doesn't match environment version
>
> Gentoo Linux allows several different versions of programs to be installed
> simultaneously. On this laptop, I have package 'db' versions:
>
> 4.2.52_p2
> 4.1.25_p1-r4
> 4.0.14-r3
> 1.85-r2
>
> installed. It would seem that the error message indicates some sort of
> update procedure on each repository to convert database storage formats.
> Alternatively, I wouldn't mind doing a dump-restore on each, if someone
> can spell out the steps.

The recommended procedure for moving between BDB versions is to "svnadmin 
dump" using a svnadmin linked to the old bdb version, and "svnadmin load" 
using a svnadmin linked to the new bdb version. There are other ways in some 
circumstances, but this is the simple, recommended, all-purpose way to do 
it.

Max.


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