You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jim Gifford <ma...@jg555.com> on 2006/09/28 21:48:42 UTC

Complete mirroring via svnsync

I'm working on getting svnsync to be utilized as mechanism to mirror our 
repos out. I have found various different ways to get this done, but the 
most efficient an reliable seems to be using svnsync. We have used svk 
and didn't like the revision #'s getting out of whack. So here's what I' 
thinking we could do to get a full functional mirroring working. This 
information is borrowed from various different sources. Currently this 
solution doesn't work because of setup 3, need some outside opinions to 
help out here.

1    Setup subversion to utilize webdav

2   Setup apache with the following options, which will allow us to 
mirror, and force the commits to the master repo
       <Location /svn/repos>
  <Limit CHECKOUT DELETE GET MERGE PROPFIND PUT OPTIONS REPORT>
    DAV svn
    SVNParentPath /srv/svn
    SVNIndexXSLT /svnindex.xsl
    AuthzSVNAccessFile /etc/svn/svn_auths
    Satisfy Any
    Require valid-user
    AuthType Basic
    AuthName "Subversion Repository"
    AuthUserFile /etc/svn/svn_users
  </Limit>
 <LimitExcept CHECKOUT DELETE GET MERGE PROFIND PUT OPTIONS REPORT>
       ProxyPass http://masterrepo.com/svn/repos
       ProxyPassReverse http://masterrepo.com/svn/repos
</LimitExcept>
</Location>

This works so far, but my problem is telling the sites to do a sync. In 
the past I've used rsync to sync everything, but I don't think thats a 
good option.

Any opinions or ideas?

Thank you for your time
Jim Gifford

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

Re: Complete mirroring via svnsync

Posted by marc gonzalez-carnicer <ca...@gmail.com>.
a wiki that contained links to such things (amongst others, like
email threads on the mailing list archives) until the svn-book is
not updated would be very useful. for users and for the book
writers.

somebody said not much ago he could start one ... ;)



2006/9/29, Garrett Rooney <ro...@electricjellyfish.net>:
> On 9/28/06, Jim Gifford <ma...@jg555.com> wrote:
> > I'm working on getting svnsync to be utilized as mechanism to mirror our
> > repos out.
> 
> Have you looked at the info in
> http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt yet?  That
> should explain many of your questions...
> 
> -garrett
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
> 
> 

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

Re: Complete mirroring via svnsync

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 9/28/06, Jim Gifford <ma...@jg555.com> wrote:
> I'm working on getting svnsync to be utilized as mechanism to mirror our
> repos out.

Have you looked at the info in
http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt yet?  That
should explain many of your questions...

-garrett

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

Re: Complete mirroring via svnsync

Posted by Mark <ma...@mitsein.net>.
svnsync init is run on the mirror repos right after creating it.

On 9/28/06, Jim Gifford <ma...@jg555.com> wrote:
> Mark,
>     Would I need to run svnsync init on my master repo? That may be the
> step I'm missing.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>


-- 
Mark
"Blessed is he who finds happiness in his own foolishness, for he will
always be happy."

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

Re: Complete mirroring via svnsync

Posted by Jim Gifford <ma...@jg555.com>.
Mark,
    Would I need to run svnsync init on my master repo? That may be the 
step I'm missing.

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

Re: Complete mirroring via svnsync

Posted by Mark <ma...@mitsein.net>.
I'm currently supporting svn+ssh and http[s] svn urls.  Since I have
thousands of users and hundreds of repositories, I am using ldap for
auth with svn+ssh (ssh) and http[s] (apache).  That presented a
problem when I needed to be able to run an svnsync for any repository
and the user would not necessarily have credentials cached for that
(it could be run as my apache user or as the user themselves if they
ran svn+ssh).
So, I decided the easiet thing to do is to enable svnserve and create
one user, svnsync, in a master password file that all the
respos/conf/svnserve.conf files refer to.  Also, I added svnsync to
the authz for every repos with [/] = rw.
That done, I added something like this in post-commit for each repos:
svnsync --non-interactive --username svnsync --password <svnsync pass>
--no-auth-cache sync svn://svn.server.mine${REPOS} &

and in post-revprop-change:
svnsync --non-interactive --username svnsync --password  <svnsync
pass> --no-auth-cache copy-revprops svn://svn.server.mine${REPOS}
${REV}

Note that I am running my svn server on linux.  Seeing as you seem to
not be tied to ldap for your svn apache setup, you could just add
svnsync to your AuthUserFile and AuthzSVNAccessFile and be happy.

On 9/28/06, Jim Gifford <ma...@jg555.com> wrote:
> Mark wrote:
> > Yeah, you don't want to mix rsync with svnsync.  Lemme see if I
> > understand what you are wanting to do, though.  You confused me by
> > saying "allow us to mirror, and force the commits to the master repo."
> > You are committing to the master repo and not a mirror, right?  Why
> > do you say force?
> >
> What happens with the way I have the proxy setup, no matter what server
> you commit to, it gets forced back to the main server.
> > Also, what do you mean by "telling the sites to do a sync?"  Do you
> > have more than one mirror or master?
> >
> We have one master repo
> > Personally, I set up svnserve and created an svnsync user that has rw
> > in every repos.  Using triggers in post-commit and post-revprop-change
> > the master repository generates syncs on each commit.
> >
> How did you accomplish this, I'm interested. We are using svn with Apache.
>


-- 
Mark
"Blessed is he who finds happiness in his own foolishness, for he will
always be happy."

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

Re: Complete mirroring via svnsync

Posted by Jim Gifford <ma...@jg555.com>.
Mark wrote:
> Yeah, you don't want to mix rsync with svnsync.  Lemme see if I
> understand what you are wanting to do, though.  You confused me by
> saying "allow us to mirror, and force the commits to the master repo."
> You are committing to the master repo and not a mirror, right?  Why
> do you say force?
>
What happens with the way I have the proxy setup, no matter what server 
you commit to, it gets forced back to the main server.
> Also, what do you mean by "telling the sites to do a sync?"  Do you
> have more than one mirror or master?
>
We have one master repo
> Personally, I set up svnserve and created an svnsync user that has rw
> in every repos.  Using triggers in post-commit and post-revprop-change
> the master repository generates syncs on each commit.
>
How did you accomplish this, I'm interested. We are using svn with Apache.

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

Re: Complete mirroring via svnsync

Posted by Mark <ma...@mitsein.net>.
Yeah, you don't want to mix rsync with svnsync.  Lemme see if I
understand what you are wanting to do, though.  You confused me by
saying "allow us to mirror, and force the commits to the master repo."
 You are committing to the master repo and not a mirror, right?  Why
do you say force?

Also, what do you mean by "telling the sites to do a sync?"  Do you
have more than one mirror or master?

Personally, I set up svnserve and created an svnsync user that has rw
in every repos.  Using triggers in post-commit and post-revprop-change
the master repository generates syncs on each commit.

On 9/28/06, Jim Gifford <ma...@jg555.com> wrote:
> I'm working on getting svnsync to be utilized as mechanism to mirror our
> repos out. I have found various different ways to get this done, but the
> most efficient an reliable seems to be using svnsync. We have used svk
> and didn't like the revision #'s getting out of whack. So here's what I'
> thinking we could do to get a full functional mirroring working. This
> information is borrowed from various different sources. Currently this
> solution doesn't work because of setup 3, need some outside opinions to
> help out here.
>
> 1    Setup subversion to utilize webdav
>
> 2   Setup apache with the following options, which will allow us to
> mirror, and force the commits to the master repo
>        <Location /svn/repos>
>   <Limit CHECKOUT DELETE GET MERGE PROPFIND PUT OPTIONS REPORT>
>     DAV svn
>     SVNParentPath /srv/svn
>     SVNIndexXSLT /svnindex.xsl
>     AuthzSVNAccessFile /etc/svn/svn_auths
>     Satisfy Any
>     Require valid-user
>     AuthType Basic
>     AuthName "Subversion Repository"
>     AuthUserFile /etc/svn/svn_users
>   </Limit>
>  <LimitExcept CHECKOUT DELETE GET MERGE PROFIND PUT OPTIONS REPORT>
>        ProxyPass http://masterrepo.com/svn/repos
>        ProxyPassReverse http://masterrepo.com/svn/repos
> </LimitExcept>
> </Location>
>
> This works so far, but my problem is telling the sites to do a sync. In
> the past I've used rsync to sync everything, but I don't think thats a
> good option.
>
> Any opinions or ideas?
>
> Thank you for your time
> Jim Gifford
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>


-- 
Mark
"Blessed is he who finds happiness in his own foolishness, for he will
always be happy."

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