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
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.
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Thu Sep 23 00:28:00 2004