You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ni...@imag.fr on 2009/10/15 15:06:11 UTC

svnadmin dump || hotcopy : Program version matching error

Hi there,

I am starting to administrate a series of svn repositories, and face
problem when trying to dump or hotcopy them.

---
Problem report
---

Running:

% sudo svn dump /path/to/my/repository
or
% sudo svn hotcopy /path/to/my/repository

I get the (usual?) error:

svn: Berkeley DB error while opening environment for filesystem 
cordisoff/db:
Argument invalide
svn: bdb: Program version 4.2 doesn't match environment version



A weird (?) thing is the fact that everything runs smooth (eg : svn co,
svn up, svn commit, svnadmin create, etc.) appart these commands...
This may be strange, since the problem report I read on the Net explain
that most svn commands are broken when having a berkeley DB version
problem...


---
Remark...
---
I do know that this error is quite common. But I did not find an
appropriate HOWTO for a svn administror newbee like myself :( Sorry for
that.



---
Config
---
Here are some details on my config :
   svn version                            1.1.4 (quite old indeed !)
   db schema format of my repositories    3
   berkeleydb version (eg db4.2_archive)  4.2

The db format of my repository is      3

Here we go.


---
Question 1
---
Since svnadmin dump||hotcopy do not work, What should I do to secure this
important repository before I change anything on it, or before I upgrade
anything in svn ?

Is copying (cp -r) the repository sufficient in such a case ?

---
Question 2)
---
The problem should be related to the DB schema version of my repository,
as compared to the schema version of the svn binary (or berkeley db
binary).

A weird thing, here, is that the server has NOT been upgraded since the
repository has been created (at least for one of them).

Do you see an explenation to this ?


---
Question 3)
---
Apprently I should "upgrade my repository", as explained in various
places, eg http://svn.collab.net/repos/svn/trunk/notes/repos_upgrade_HOWTO

Is that correct ?

The upgrade process requires using an old binary of svnadmin with the same
schema version as my repository (3 in my case).

Well OK.

But how can I know which svn version is OK for this ?
And how may I get it and install it ?





I thank you much for your answers.
And sorry for this (not new) question...

Sincerely,
Nicolas

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2407930

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svnadmin dump || hotcopy : Program version matching error

Posted by Ni...@imag.fr.
Hi all,

Issue solved.
Many thanks to you all for your attention, time and help.

I provide below a report on how I managed to solve the problem, in case it
could help.

The BerkeleyDB version problem was due to the fact that my system had not
been updated for long, and that a past update had not been achieved
correctly.

In fact, on my machine, the apache-based means (allow accesing the
repository with http) used libdb-1.4, whereas my svn/svnadmin stuff used
libdb-1.2.
Since all work on the repository so far had been done using apache, the
repository was "built" using BerkeleyDB 1.4...

I guess that the apache-side of svn had been updated one day on the
system, but not the subversion package itself. Anyway...

=> HOW TO <=
To "divine" the version of BerkeleyDB used to build the repository, I used:
http://subversion.tigris.org/faq.html#divining-bdb-version

To see the version of BerkeleyDB against which svn's apache-based means
were built, I used:
% ldd ldd /usr/lib/apache2/modules/mod_dav_svn.so

To get the version of BerkeleyDB against which the binaries svn and
svnadmin were built, I used:
% ldd /usr/bin/svn
% ldd /usr/bin/svnadmin
<= END OF HOW TO =>


The next step was upgrading the subversion binaries (svn/svnadmin) to a
version linked against the correct version of BerkeleyDB (1.4 in my case).

=> HOW TO <=
The system here is a Debian distrib.
The following relates to Debian.

To upgrade on Debian the subversion package to a version linked against
BerkeleyDB 1.4, first, I needed to see which version was OK.

http://packages.debian.org/ is the place to go for this. You get there a
list of dependecies for each package.

In my case, I have had to search in the old stable packages (ie etch).

Then, I installed this package using apt:
% apt-get install subversion=1.4.2dfsg1-3

Facing the need of an old stable version, you may of course have to work a
bit to fix apt's /etc/apt/sources.list list of packages repositories...

<= END OF HOW TO =>


After these steps, "svnadmin dump" and "svnadmin hotcopy" were back on line.


The last step was to achieve a global update of my machine's distribution.

Once this had been done, svn could no more access the repositories anymore.
Logical, indeed: the repositories were still "built" using BerkeleyDB 1.4,
whereas the just-installed, last-stable, subversion package uses
BerkeleyDB 1.6.

Fortunately, runing:
% svnadmin recover <myrepository>
fixed this issue, and upgrated the repository's version of bdb to the
correct, last, one.


That's it!
Now, everything runs "like a charm".


Thanks again, especially Ryan and Jeremy,
Nicolas

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410722

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svnadmin dump || hotcopy : Program version matching error

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 21, 2009, at 03:15, Nicolas.Castagne@imag.fr wrote:

> Here are the BDB versions used by the various piece of software at  
> hand :
>
> mod_dav_svn.so  ---> bdb 4.4
>   ldd /usr/lib/apache2/modules/mod_dav_svn.so  libdb-4.4.so
> svn exe         ---> bdb 4.2
>   ldd /usr/bin/svn                             libdb-4.2.so
> svnadmin exe    ---> bdb 4.2
>   ldd /usr/bin/svnadmin                        libdb-4.2.so
>
>
> Also, the repositories are "built" using BDB version is 4.4 (following
> http://subversion.tigris.org/faq.html#divining-bdb-version). This is
> rather logical since the repositories have been accessed/commited  
> using
> apache only.
>
>
> Mmmhhh...
> I guess that svn simply needs an update on the server.
> Much simpler than I expected! I need newer binaries instead of older.

Oh good!


> A question is:
> Do you think that the **latest** svn version could "svnadmin  
> recover" the
> repositories that use BDB version 4.4 ?
>
> If yes, I just update globally my linux distrib.
>
> If not, I will try using the package manager to get a version of  
> svnadmin
> and svn binaries linked against libdb-4.4.

I'm not really sure. I haven't dealt with BDB repositories personally.  
I have a feeling that the FAQ entry

http://subversion.tigris.org/faq.html#bdb43-upgrade

is talking about going from BDB 4.2 or earlier to BDB 4.3 or later.  
It's not clear to me whether it's still needed when going from BDB 4.4  
to something later. Note that's the only time you'd need to recover,  
aside from if your repository isn't working; if you just want to  
upgrade to a later Subversion, but keep BerkeleyDB at version 4.4,  
there should be no problem.

If you do want to upgrade BDB too, then I would say just give it a  
try. Back up your repository first, of course, in case it doesn't  
work, then upgrade Subversion and BDB and see if you can access the  
repository. If not, try recover.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2410054

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svnadmin dump || hotcopy : Program version matching error

Posted by Ni...@imag.fr.
Hi Ryan,
thanks much,

Just a small update in there, before I start working on the system.



Here are the BDB versions used by the various piece of software at hand :

mod_dav_svn.so  ---> bdb 4.4
   ldd /usr/lib/apache2/modules/mod_dav_svn.so  libdb-4.4.so
svn exe         ---> bdb 4.2
   ldd /usr/bin/svn                             libdb-4.2.so
svnadmin exe    ---> bdb 4.2
   ldd /usr/bin/svnadmin                        libdb-4.2.so


Also, the repositories are "built" using BDB version is 4.4 (following
http://subversion.tigris.org/faq.html#divining-bdb-version). This is
rather logical since the repositories have been accessed/commited using
apache only.


Mmmhhh...
I guess that svn simply needs an update on the server.
Much simpler than I expected! I need newer binaries instead of older.


A question is:
Do you think that the **latest** svn version could "svnadmin recover" the
repositories that use BDB version 4.4 ?

If yes, I just update globally my linux distrib.

If not, I will try using the package manager to get a version of svnadmin
and svn binaries linked against libdb-4.4.



Thanks much,
Nicolas




> On Oct 20, 2009, at 13:53, Ryan Schmidt wrote:
>
>>> 1/ when using svnadmin from the machine where the repositories are,
>>> most
>>> subcommands throw an error in the form:
>>>
>>> “svn: Berkeley DB error while opening environment for filesystem
>>> cordisoff/db:
>>> Argument invalide
>>> svn: bdb: Program version 4.2 doesn't match environment version”
>>
>> Then your svnadmin was built for a version of BerkeleyDB different
>> from 4.2.
>>
>>
>>> 2/ when using svn with the http protocol, from ANY machine,
>>> everything
>>> goes always OK.
>>
>> Then presumably your mod_dav_svn was built for BerkeleyDB 4.2. So it
>> sounds like your mod_dav_svn may not be matched with the rest of your
>> Subversion software. On many systems, you need to manually copy
>> mod_dav_svn to the right place for Apache to see when you upgrade
>
> Thinking about this further, I may have this a bit backward. It's the
> repository that is "built" for a particular BerkeleyDB version, not
> the Subversion parts. Presumably when you're using svnadmin and when
> you're using mod_dav_svn you're talking to the same repository. So
> then, the error message you get from svnadmin shows that BerkeleyDB
> 4.2 is what svnadmin is using, but this isn't the right version for
> accessing the repository. Conversely, your mod_dav_svn has no problem
> using the repository, so maybe your mod_dav_svn is using a different
> version of BerkeleyDB -- maybe you have multiple versions installed on
> your server simultaneously.
>
> Or is it possible that your Apache has just never been restarted after
> BerkeleyDB was updated to 4.2, and that if you were to now restart
> Apache, you would no longer be able to access the repository from
> there either? I suppose you would prefer not to test that theory at
> the moment. :) But it might be useful to know your Apache's uptime.
>
> You may want to follow this FAQ entry to determine which version of
> BerkeleyDB your repository is "built" for at this moment:
>
> http://subversion.tigris.org/faq.html#divining-bdb-version
>
> If you find your repository is "built" for BerkeleyDB < 4.2, you can
> apparently upgrade it to BerkeleyDB 4.2 specs by using "svnadmin
> recover". If you wanted to upgrade to a later version of BerkeleyDB,
> this FAQ would be relevant:
>
> http://subversion.tigris.org/faq.html#bdb43-upgrade
>
>
> Also note that as of Subversion 1.2, the default repository format is
> no longer BerkeleyDB but "FSFS". If you manage to find a way to dump
> your repository and load it into a new one, you'll get an FSFS
> repository (unless you explicitly ask for a BDB one). FSFS was
> specifically designed for Subversion to avoid the intricacies of
> managing BerkeleyDB -- such as these version mismatches -- so if you
> use FSFS, you won't ever have to deal with this again (or even have
> BerkeleyDB installed). As you can imagine, I recommend using FSFS.
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2409509
>
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe@subversion.tigris.org].
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2409684

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svnadmin dump || hotcopy : Program version matching error

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 20, 2009, at 13:53, Ryan Schmidt wrote:

>> 1/ when using svnadmin from the machine where the repositories are,
>> most
>> subcommands throw an error in the form:
>>
>> “svn: Berkeley DB error while opening environment for filesystem
>> cordisoff/db:
>> Argument invalide
>> svn: bdb: Program version 4.2 doesn't match environment version”
>
> Then your svnadmin was built for a version of BerkeleyDB different
> from 4.2.
>
>
>> 2/ when using svn with the http protocol, from ANY machine,  
>> everything
>> goes always OK.
>
> Then presumably your mod_dav_svn was built for BerkeleyDB 4.2. So it
> sounds like your mod_dav_svn may not be matched with the rest of your
> Subversion software. On many systems, you need to manually copy
> mod_dav_svn to the right place for Apache to see when you upgrade

Thinking about this further, I may have this a bit backward. It's the  
repository that is "built" for a particular BerkeleyDB version, not  
the Subversion parts. Presumably when you're using svnadmin and when  
you're using mod_dav_svn you're talking to the same repository. So  
then, the error message you get from svnadmin shows that BerkeleyDB  
4.2 is what svnadmin is using, but this isn't the right version for  
accessing the repository. Conversely, your mod_dav_svn has no problem  
using the repository, so maybe your mod_dav_svn is using a different  
version of BerkeleyDB -- maybe you have multiple versions installed on  
your server simultaneously.

Or is it possible that your Apache has just never been restarted after  
BerkeleyDB was updated to 4.2, and that if you were to now restart  
Apache, you would no longer be able to access the repository from  
there either? I suppose you would prefer not to test that theory at  
the moment. :) But it might be useful to know your Apache's uptime.

You may want to follow this FAQ entry to determine which version of  
BerkeleyDB your repository is "built" for at this moment:

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

If you find your repository is "built" for BerkeleyDB < 4.2, you can  
apparently upgrade it to BerkeleyDB 4.2 specs by using "svnadmin  
recover". If you wanted to upgrade to a later version of BerkeleyDB,  
this FAQ would be relevant:

http://subversion.tigris.org/faq.html#bdb43-upgrade


Also note that as of Subversion 1.2, the default repository format is  
no longer BerkeleyDB but "FSFS". If you manage to find a way to dump  
your repository and load it into a new one, you'll get an FSFS  
repository (unless you explicitly ask for a BDB one). FSFS was  
specifically designed for Subversion to avoid the intricacies of  
managing BerkeleyDB -- such as these version mismatches -- so if you  
use FSFS, you won't ever have to deal with this again (or even have  
BerkeleyDB installed). As you can imagine, I recommend using FSFS.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2409509

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svnadmin dump || hotcopy : Program version matching error

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 20, 2009, at 05:44, Nicolas.Castagne@imag.fr wrote:

>> Client-side settings are in the file ~/.subversion/config
> Definitely, nothing related to the problem there.
>
>> Server-side settings depend on how your server is set up.
> It is accessed using apache.

Ok. Then your server-side settings are in httpd.conf, or in a file  
included from there.

I don't expect there will be anything related to your problem in there  
either; just telling you where the settings are, since you asked.

> 1/ when using svnadmin from the machine where the repositories are,  
> most
> subcommands throw an error in the form:
>
> “svn: Berkeley DB error while opening environment for filesystem
> cordisoff/db:
> Argument invalide
> svn: bdb: Program version 4.2 doesn't match environment version”

Then your svnadmin was built for a version of BerkeleyDB different  
from 4.2.


> 2/ when using svn with the http protocol, from ANY machine, everything
> goes always OK.

Then presumably your mod_dav_svn was built for BerkeleyDB 4.2. So it  
sounds like your mod_dav_svn may not be matched with the rest of your  
Subversion software. On many systems, you need to manually copy  
mod_dav_svn to the right place for Apache to see when you upgrade  
Subversion, so don't forget this step.


> 3/ Versions and format on the svn server are:
> - svn version is 1.1.4
> - The repositories’ “format” is “3”
> - intalled bdb version is 4.2     (eg db4.2_dump, libdb4.2, etc.)

Subversion 1.4.x and earlier are unsupported now, so I'm hopeful  
you'll be able to upgrade to the current version and get your  
repository working with it.


> 1/ is it possible to secure temporarily the repositories, before  
> updating
> the server’s configuration, since “svnadmin dump" does not work ?

You can take the server offline (e.g. stop Apache) and then use "tar"  
or even just "cp -Rp" to make a copy of the repository directories for  
backup purposes. This isn't a good general-purpose backup strategy  
because this repository won't necessarily work on another computer,  
another OS, another BDB version, etc. But for purposes of backing up  
before doing a potentially destructive action on this server, with the  
intention of restoring the backup to this same server in the event of  
a problem, it's fine.


> 2/ should I try updating the concerned packages using simply my linux
> distribution’s package maintainer ?

If that's how they were installed initially, that might be a good  
place to start.


> 3/ Apparently I should "upgrade my repository" to work around bdb  
> version
> problem (eg
> http://svn.collab.net/repos/svn/trunk/notes/repos_upgrade_HOWTO )

That document seems to relate to Subversion repository schema changes,  
not to BerkeleyDB version changes, so I don't think it's applicable to  
your situation.


> Upgrading requires “using an old binary of svnadmin with the same  
> schema
> version as my repository” (3 in my case).
>
> How may I get the appropriate “old binary”?

That depends on how you usually install software on your server. For  
example, perhaps you could use your package management system for  
this. But again, I'm not certain using an older version will be  
necessary at all.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2409502

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svnadmin dump || hotcopy : Program version matching error

Posted by Ni...@imag.fr.
Hi,
Thanks Ryan.

> Client-side settings are in the file ~/.subversion/config
Definitely, nothing related to the problem there.

> Server-side settings depend on how your server is set up.
It is accessed using apache.
Repositories are on the svn user's home.
(if this is the appropriate answer to your question).


I summarize the investigations so far below.




1/ when using svnadmin from the machine where the repositories are, most
subcommands throw an error in the form:

“svn: Berkeley DB error while opening environment for filesystem
cordisoff/db:
Argument invalide
svn: bdb: Program version 4.2 doesn't match environment version”



2/ when using svn with the http protocol, from ANY machine, everything
goes always OK.




3/ Versions and format on the svn server are:
- svn version is 1.1.4
- The repositories’ “format” is “3”
- intalled bdb version is 4.2     (eg db4.2_dump, libdb4.2, etc.)



Questions are:

1/ is it possible to secure temporarily the repositories, before updating
the server’s configuration, since “svnadmin dump" does not work ?


2/ should I try updating the concerned packages using simply my linux
distribution’s package maintainer ?



3/ Apparently I should "upgrade my repository" to work around bdb version
problem (eg
http://svn.collab.net/repos/svn/trunk/notes/repos_upgrade_HOWTO )

Upgrading requires “using an old binary of svnadmin with the same schema
version as my repository” (3 in my case).

How may I get the appropriate “old binary”?





Well… I wish I would have installed this server myself…
But now, I have to figure out how to make it work !

Thanks in advance for your help,
Nicolas







> On Oct 16, 2009, at 10:14, Nicolas.Castagne@imag.fr wrote:
>
>> is there a svn and svnadmin subcommand allowing to get svn's
>> settings and
>> berkeley db's settings ?
>
> Client-side settings are in the file ~/.subversion/config
>
> Server-side settings depend on how your server is set up.
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408269
>
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe@subversion.tigris.org].
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2409342

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svnadmin dump || hotcopy : Program version matching error

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 16, 2009, at 10:14, Nicolas.Castagne@imag.fr wrote:

> is there a svn and svnadmin subcommand allowing to get svn's  
> settings and
> berkeley db's settings ?

Client-side settings are in the file ~/.subversion/config

Server-side settings depend on how your server is set up.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408269

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svnadmin dump || hotcopy : Program version matching error

Posted by Ni...@imag.fr.
Thanks again Jeremy

>How is your repository normally accessed?
I access it using apache, from a distant machine.
eg:   svn co http://192.../svn/myrepository

> Is this working okay?
Definitely yes ! I have never had a single problem from any of the various
OS i use.


Another question is:
is there a svn and svnadmin subcommand allowing to get svn's settings and
berkeley db's settings ?

Thanks,
Nicolas



>> -----Original Message-----
>> From: Nicolas.Castagne@imag.fr [mailto:Nicolas.Castagne@imag.fr]
>> Sent: Friday, October 16, 2009 3:49 AM
>>
>>
>>
>> > I assume that these commands work properly if you are logged in as svn
>> > and you only get these errors when you sudo.
>>
>> When logged as svn, running:
>>    > svnadmin dump cordisoff > test
>>
>> returned:
>>    svn: Berkeley DB error while opening environment for filesystem
>> cordisoff/db:
>>    Permission non accordée
>>
>>
>>
>> I changed the owner of the whole repository to svn:svn
>> Then, logged back as svn, running:
>>    > svnadmin svnadmin dump cordisoff > test
>>
>> returned:
>>    svn: Berkeley DB error while opening environment for filesystem
>> cordisoff/db:
>>    Argument invalide
>>    svn: bdb: Program version 4.2 doesn't match environment version
>>
>>
>>
>>
>> So, it seems not to be due to the env variables.
>>
>>
> How is your repository normally accessed? Is this working okay?
>
> If you use the svn: protocol, check which user the svnserve service is
> using. Look at /etc/xinetd.d/svn for the USER = parameter.
>
> Sorry, I can't help with any of the other protocols.
>
> jlm
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408248
>
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe@subversion.tigris.org].
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408264

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svnadmin dump || hotcopy : Program version matching error

Posted by Jeremy Mordkoff <jl...@ZeeVee.Com>.
> -----Original Message-----
> From: Nicolas.Castagne@imag.fr [mailto:Nicolas.Castagne@imag.fr]
> Sent: Friday, October 16, 2009 3:49 AM
> 
> 
> 
> > I assume that these commands work properly if you are logged in as svn
> > and you only get these errors when you sudo.
> 
> When logged as svn, running:
>    > svnadmin dump cordisoff > test
> 
> returned:
>    svn: Berkeley DB error while opening environment for filesystem
> cordisoff/db:
>    Permission non accordée
> 
> 
> 
> I changed the owner of the whole repository to svn:svn
> Then, logged back as svn, running:
>    > svnadmin svnadmin dump cordisoff > test
> 
> returned:
>    svn: Berkeley DB error while opening environment for filesystem
> cordisoff/db:
>    Argument invalide
>    svn: bdb: Program version 4.2 doesn't match environment version
> 
> 
> 
> 
> So, it seems not to be due to the env variables.
> 
> 
How is your repository normally accessed? Is this working okay? 

If you use the svn: protocol, check which user the svnserve service is using. Look at /etc/xinetd.d/svn for the USER = parameter. 

Sorry, I can't help with any of the other protocols.

jlm

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408248

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svnadmin dump || hotcopy : Program version matching error

Posted by Ni...@imag.fr.
Hello,
thanks Jeremy.


To start, if the problem may be due to env. variables, I must say that I
am working through ssh.
I don't see why this would affect svn admin but...


Following your suggestion:


> I assume that these commands work properly if you are logged in as svn
> and you only get these errors when you sudo.

When logged as svn, running:
   > svnadmin dump cordisoff > test

returned:
   svn: Berkeley DB error while opening environment for filesystem
cordisoff/db:
   Permission non accordée



I changed the owner of the whole repository to svn:svn
Then, logged back as svn, running:
   > svnadmin svnadmin dump cordisoff > test

returned:
   svn: Berkeley DB error while opening environment for filesystem
cordisoff/db:
   Argument invalide
   svn: bdb: Program version 4.2 doesn't match environment version




So, it seems not to be due to the env variables.




> If so, try adding the -H

Logged as svn, running:
   > sudo -H svnadmin dump cordisoff > test

returned again:
    svn: Berkeley DB error while opening environment for filesystem
cordisoff/db:
    Argument invalide
    svn: bdb: Program version 4.2 doesn't match environment version




> If that fails, try comparing the results of
> sudo -h svn printenv
> to logging in as svn and running printenv

I guess you meant sudo -u svn printenv ?
Well, not many difference arround: same HOME, logname, etc

Only difference is in the path.
With printenv, logged as svn:
   PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

With sudo -u svn printenv:
   PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin


Well, I must say I am still "lost" :/


Thanks,
Nicolas





>> -----Original Message-----
>> From: Nicolas.Castagne@imag.fr [mailto:Nicolas.Castagne@imag.fr]
>> Sent: Thursday, October 15, 2009 11:06 AM
>>
>> Hi there,
>>
>> I am starting to administrate a series of svn repositories, and face
>> problem when trying to dump or hotcopy them.
>>
>> ---
>> Problem report
>> ---
>>
>> Running:
>>
>> % sudo svn dump /path/to/my/repository
>> or
>> % sudo svn hotcopy /path/to/my/repository
>>
>> I get the (usual?) error:
>>
>> svn: Berkeley DB error while opening environment for filesystem
>> cordisoff/db:
>> Argument invalide
>> svn: bdb: Program version 4.2 doesn't match environment version
>>
>>
>
> I assume that these commands work properly if you are logged in as svn
> and you only get these errors when you sudo. If so, try adding the -H
> flag to sudo so that svn's environment is properly set.
>
> If that fails, try comparing the results of
>
> sudo -h svn printenv
>
> to logging in as svn and running printenv
>
> JLM
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2407938
>
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe@subversion.tigris.org].
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408153

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svnadmin dump || hotcopy : Program version matching error

Posted by Jeremy Mordkoff <jl...@ZeeVee.Com>.
> -----Original Message-----
> From: Nicolas.Castagne@imag.fr [mailto:Nicolas.Castagne@imag.fr]
> Sent: Thursday, October 15, 2009 11:06 AM
> 
> Hi there,
> 
> I am starting to administrate a series of svn repositories, and face
> problem when trying to dump or hotcopy them.
> 
> ---
> Problem report
> ---
> 
> Running:
> 
> % sudo svn dump /path/to/my/repository
> or
> % sudo svn hotcopy /path/to/my/repository
> 
> I get the (usual?) error:
> 
> svn: Berkeley DB error while opening environment for filesystem
> cordisoff/db:
> Argument invalide
> svn: bdb: Program version 4.2 doesn't match environment version
> 
> 

I assume that these commands work properly if you are logged in as svn
and you only get these errors when you sudo. If so, try adding the -H
flag to sudo so that svn's environment is properly set. 

If that fails, try comparing the results of 

sudo -h svn printenv 

to logging in as svn and running printenv 

JLM

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2407938

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].