You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by PR <rp...@gmail.com> on 2011/10/01 02:00:39 UTC

Subversion migration using svnsync from 1.4.6 to 1.7

Hello,

I had initially got a lot of great feedback from the group.

I had decided to migrate the repo using the svnsync and the new server is
1.7 rc3 for the POC migration. (old server 1.4.6).

Initially every thing was smooth now we are noticing that some repositories

we get a failure in sync and that fails with following error

svnsync: E000022: Commit created rev 3912 but should have created 3913

and what i notice is that the 3912 on the source is actually missed and the
3913 comes in as 3912 ..on the target repo ..
the other thing is that this rev is saved as root .. (since i am running as
sudo, the post rev prop has not got a chance to change it to the actual
owner ) ..

any help or pointers?

I did search the error and tried to use the suggestion made some places with
use of


http://code.google.com/p/svnbook/source/browse/trunk/en/book/ch05-repository-admin.xml

svnsync: E000022: Destination repository already contains revision history;
co
nsider using --allow-non-empty if the repository's revisions are known to
mirr
or their respective revisions in the source repository
$ svnsync initialize --allow-non-empty file:///path/to/mirror-repos \
file:///path/to/repos
Copied properties for revision 32042.
$

but that does not seem to help either.

any help will be much appreciated ...

the other way is the long and laborious dump and load from old to new
server...  but that too is not without its share of frustration .in terms of
dump then tar and then load.


Regards,
Rajesh

Re: Subversion migration using svnsync from 1.4.6 to 1.7

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Fri, Sep 30, 2011 at 8:00 PM, PR <rp...@gmail.com> wrote:

> Hello,
>
> I had initially got a lot of great feedback from the group.
>
> I had decided to migrate the repo using the svnsync and the new server is
> 1.7 rc3 for the POC migration. (old server 1.4.6).
>
> Initially every thing was smooth now we are noticing that some
> repositories
>
> we get a failure in sync and that fails with following error
>
> svnsync: E000022: Commit created rev 3912 but should have created 3913
>
> and what i notice is that the 3912 on the source is actually missed and the
> 3913 comes in as 3912 ..on the target repo ..
> the other thing is that this rev is saved as root .. (since i am running as
> sudo, the post rev prop has not got a chance to change it to the actual
> owner ) ..


Then you have a *big* problem. dump/load, rsync, and svnsync are *not* going
to be able to solve this for you. This is a problem with any system that
relies on assembling a long chain of differences together to assemble
complete objects. If you lose a single step of the re-assembly, you don't
have redundancy or error checking or anything to recover the data with.

All may not be lost, however. Can you check old backups to find the
revision? Or can you rsync the old repo over to the new server, simply to
*experiment* with, and try running the svnsync against a local copy of thee
files, in case any mismatches between the 1.4.x version of subversion and
the 1.7.x pre-release, not yet production code you're using  are generating
the error.

Last obvious step is to insert a blank revision.....

Re: Subversion migration using svnsync from 1.4.6 to 1.7

Posted by PR <rp...@gmail.com>.
On Fri, Sep 30, 2011 at 5:53 PM, Konstantin Kolinko
<kn...@gmail.com>wrote:

> 2011/10/1 PR <rp...@gmail.com>
> >
> > Hello,
> > I had initially got a lot of great feedback from the group.
> > I had decided to migrate the repo using the svnsync and the new server is
> 1.7 rc3 for the POC migration. (old server 1.4.6).
> > Initially every thing was smooth now we are noticing that some
> repositories
> > we get a failure in sync and that fails with following error
> >
> > svnsync: E000022: Commit created rev 3912 but should have created 3913
> >
> > and what i notice is that the 3912 on the source is actually missed and
> the 3913 comes in as 3912 ..on the target repo ..
> >
> > the other thing is that this rev is saved as root .. (since i am running
> as sudo, the post rev prop has not got a chance to change it to the actual
> owner ) ..
> > any help or pointers?
>
> When using svnsync there are usually three versions of svn running:
> source server, target server, and the svnsync program itself.  What
> version of svnsync you were using? Was it 1.7 rc3 as well? (BTW, rc4
> was published recently).
>
> What protocols your svnsync is using to access the source and the
> target servers? (file, svn, http(s))?
>
> Your OS - some Unix? Is it 32 or 64 bit?
>


source : 1.4.6 as5 64 bit server
target : 1.7. rc3 as5 64 bit server
svnsync is the 1.7 rc3


to access source : http protocol to write to dest \ target repo : file:///

>
> >
> > I did search the error and tried to use the suggestion made some places
> with use of
> >
> >
> http://code.google.com/p/svnbook/source/browse/trunk/en/book/ch05-repository-admin.xml
>
> The more known URL to the same book is
> http://svnbook.red-bean.com/index.en.html
>
>
> http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.replication
>
>
my search returned that result hence .. but yes agree those are the well
known urls ...

> >
> > svnsync: E000022: Destination repository already contains revision
> history; co
> > nsider using --allow-non-empty if the repository's revisions are known to
> mirr
> > or their respective revisions in the source repository
> > $ svnsync initialize --allow-non-empty file:///path/to/mirror-repos \
> > file:///path/to/repos
> > Copied properties for revision 32042.
> > $
> >
> > but that does not seem to help either.
>
> Can the same error code produce different text messages? I'd think
> that the error code in the book is wrong. Though there it is actually
> for the "initialize" command.
>
> >
> > any help will be much appreciated ...
> >
> > the other way is the long and laborious dump and load from old to new
> server...  but that too is not without its share of frustration .in terms of
> dump then tar and then load.
> >
>
> In your target repository - do you check user name in the pre-commit
> hook? Only the one special user that svnsync runs as has to be allowed
> to write there.
>

yes right for now the special user is the only one who can write there
  (just a back ground .. we have this wrapper around the sudo command to be
a root user without really knowing the password .. my guess is some race
condition perhaps causing a revision to be skipped ...from the source and
the higher rev on the source gets in as the skipped version on the target
...)

if it helps in one of the repos that this happened i did not see any diff ..
so the file was just added with null text in it .. so a diff -c on that rev
showed no diff at all... i will look more closely ...

>
> Best regards,
> Konstantin Kolinko
>

Re: Subversion migration using svnsync from 1.4.6 to 1.7

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Daniel Shahaf wrote on Sat, Oct 01, 2011 at 09:06:33 +0300:
> If you think Subversion should promise a specific error code in this
> situation, please file a bug against svnsync.

I meant: file a bug after discussing it on this list, per the normal bug
filing guidelines. Thanks.

Re: Subversion migration using svnsync from 1.4.6 to 1.7

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Konstantin Kolinko wrote on Sat, Oct 01, 2011 at 04:53:01 +0400:
> 2011/10/1 PR <rp...@gmail.com>
> > svnsync: E000022: Destination repository already contains revision history; co
> > nsider using --allow-non-empty if the repository's revisions are known to mirr
> > or their respective revisions in the source repository
> > $ svnsync initialize --allow-non-empty file:///path/to/mirror-repos \
> > file:///path/to/repos
> > Copied properties for revision 32042.
> > $
> >
> > but that does not seem to help either.
> 
> Can the same error code produce different text messages?

Yes.  An error code has a default message associated with it, but when
an error object it constructed the callsite can specify an alternative
message.

> I'd think that the error code in the book is wrong. Though there it is
> actually for the "initialize" command.

I'm surprised that it's an errno error code rather than a Subversion
error code from svn_error_codes.h.  (I can tell that by its numeric
value.)

> 

If the book is wrong, please report it to the book's mailing list.  If
you think Subversion should promise a specific error code in this
situation, please file a bug against svnsync.

Re: Subversion migration using svnsync from 1.4.6 to 1.7

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/10/1 PR <rp...@gmail.com>
>
> Hello,
> I had initially got a lot of great feedback from the group.
> I had decided to migrate the repo using the svnsync and the new server is 1.7 rc3 for the POC migration. (old server 1.4.6).
> Initially every thing was smooth now we are noticing that some repositories
> we get a failure in sync and that fails with following error
>
> svnsync: E000022: Commit created rev 3912 but should have created 3913
>
> and what i notice is that the 3912 on the source is actually missed and the 3913 comes in as 3912 ..on the target repo ..
>
> the other thing is that this rev is saved as root .. (since i am running as sudo, the post rev prop has not got a chance to change it to the actual owner ) ..
> any help or pointers?

When using svnsync there are usually three versions of svn running:
source server, target server, and the svnsync program itself.  What
version of svnsync you were using? Was it 1.7 rc3 as well? (BTW, rc4
was published recently).

What protocols your svnsync is using to access the source and the
target servers? (file, svn, http(s))?

Your OS - some Unix? Is it 32 or 64 bit?

>
> I did search the error and tried to use the suggestion made some places with use of
>
> http://code.google.com/p/svnbook/source/browse/trunk/en/book/ch05-repository-admin.xml

The more known URL to the same book is
http://svnbook.red-bean.com/index.en.html

http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.replication

>
> svnsync: E000022: Destination repository already contains revision history; co
> nsider using --allow-non-empty if the repository's revisions are known to mirr
> or their respective revisions in the source repository
> $ svnsync initialize --allow-non-empty file:///path/to/mirror-repos \
> file:///path/to/repos
> Copied properties for revision 32042.
> $
>
> but that does not seem to help either.

Can the same error code produce different text messages? I'd think
that the error code in the book is wrong. Though there it is actually
for the "initialize" command.

>
> any help will be much appreciated ...
>
> the other way is the long and laborious dump and load from old to new server...  but that too is not without its share of frustration .in terms of dump then tar and then load.
>

In your target repository - do you check user name in the pre-commit
hook? Only the one special user that svnsync runs as has to be allowed
to write there.

Best regards,
Konstantin Kolinko