You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Geoffrey Plitt <pl...@gmail.com> on 2005/05/11 15:51:33 UTC

Re: mirror/syncronize a server?

Yes, I thought of this solution. However, this is not an
atomic/reliable operation, like all of the "svn" commands are.

If there are failures during the transfer, it won't automatically get
the dumps again. It would be nice if there was some sort of "svnadmin
sync http://PATH_TO_REPO" command, which could
- access the source repo, updating this repo with all changes.
- check any previously failed attempts, and re-get the data, to come
back up to date.
- this could be scheduled once an hour or something.

Geoff

On 5/10/05, Helge Jensen <he...@slog.dk> wrote:
> Geoffrey Plitt wrote:
> > Hi,
> >
> > Is it possible to mirror/syncronize a subversion server?
> 
> Send incrementail dumps, essentially:
> 
> LAST=`cat LAST`
> NOW=`svnlook youngest $REPO`
> svnadmin dump $REPOS -r$LAST:$NOW --incremental \
>    | ssh ohterserver svnadmin load $OTHER_REPO
> echo -n $LAST > LAST
> 
> I use this daily to an offsite svn-mirror.
> 
> Of course, you need to serialize the execution of the above if you wish
> to exec it in post-commit.
> 
> --
> Helge Jensen
>    mailto:helge.jensen@slog.dk
>    sip:helge.jensen@slog.dk
>                 -=> Sebastian cover-music: http://ungdomshus.nu <=-
>

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


Re: mirror/syncronize a server?

Posted by Marcus Rueckert <da...@web.de>.
On 2005-05-12 11:30:11 +0200, Helge Jensen wrote:
> I have now... that's a lot of code ;)

really? thats the bare minimum. i just splitted it a up for a bit more
user friendlyness (config file support). without it you would have a 10
lines script. and this script is proven was being stable.

darix.

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

Re: mirror/syncronize a server?

Posted by Helge Jensen <he...@slog.dk>.
Marcus Rueckert wrote:
> On 2005-05-11 18:53:50 +0200, Helge Jensen wrote:
> 
>>  LAST=`ssh otherserver svnlook $OTHER_REPO youngest`
> 
> 
> did you ever look at svnmirror.sh?

I have now... that's a lot of code ;)

-- 
Helge Jensen
   mailto:helge.jensen@slog.dk
   sip:helge.jensen@slog.dk
                -=> Sebastian cover-music: http://ungdomshus.nu <=-

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

Re: mirror/syncronize a server?

Posted by Marcus Rueckert <da...@web.de>.
On 2005-05-11 18:53:50 +0200, Helge Jensen wrote:
>   LAST=`ssh otherserver svnlook $OTHER_REPO youngest`

did you ever look at svnmirror.sh?

http://pixel.global-banlist.de./site/node/30

darix


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

Re: mirror/syncronize a server?

Posted by Helge Jensen <he...@slog.dk>.
Geoffrey Plitt wrote:
> Yes, I thought of this solution. However, this is not an
> atomic/reliable operation, like all of the "svn" commands are.

What part is not realiable? You could retrieve $LAST from your remote 
location to prevent storing it locally, with the synchronization 
problems that yields:

   LAST=`ssh otherserver svnlook $OTHER_REPO youngest`

The only thing you need to ensure is that at most one "synchronization" 
is active at a time, that should be doable using many methods.

> - check any previously failed attempts, and re-get the data, to come
> back up to date.

This sounds like a dangerous way of splitting the action into two cases, 
one of which is a special-case.

Why not just think of it as a replication upto a certain 
revision-number? Whether something "failed" in the past isn't really 
relevant to the actual synchronization, but only to the administrator.

-- 
Helge Jensen
   mailto:helge.jensen@slog.dk
   sip:helge.jensen@slog.dk
                -=> Sebastian cover-music: http://ungdomshus.nu <=-

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