[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: how to contribute feature of unknown popularity

From: Les Mikesell <lesmikesell_at_gmail.com>
Date: Thu, 15 Jul 2010 07:44:06 -0500

Nico Kadel-Garcia wrote:
>
>> You can run rsync on windows using cygwin, or you can use one of the
>> Windows ports (google mentions DeltaCopy and cwrsync on the first page,
>> there are probably more). rsync is free software, licensed under the GPL.
>> See http://en.wikipedia.org/wiki/Rsync for more details.
>
> And, at last check as part of an attempt at an rsnapshot based backup
> system, it hangs on open files.

No it doesn't. A lot of people use it as the transport for backups in backuppc
and while it may skip files that the OS has locked, it doesn't hang when using
rsync in daemon mode.

> I had to do it my original way, which
> was to export the filesystem via CIFS, mount it and do the backups on
> the relevant rsnapshot server, because the hanging rsync issue was
> deadly.

There was an old (and long-standing) bug when using rsync under cygwin sshd that
would hang more or less at random. It is fixed in current versions. But even
in the older version you could issue the rsync command on the windows side and
use ssh with a linux/unix version under sshd on the remote side.

>> If you require encryption, rsync traffic can be encrypted using SSH or
>> stunnel (see stunnel.org). If your server runs Linux, SSH is probably
>> the easier solution. With a Windows server, stunnel might be the better
>> option since running an SSH server on Windows requires cygwin.
>
> There are some commercial SSH servers and toolkits as well. If you
> need both rsync and SSH services on the same windows server, CygWin is
> the way to go.

If you don't need encryption, you can just run rsync as a standalone daemon (use
  double-colons in the rsync command for that mode). If you do need encryption
you might use OpenVPN to set up tunnels with the staging server - which might
also be useful for VNC or other control access too. Or with the current 1.7.x
version, cygwin sshd should work the way you expect.

>> I think that using a high-quality sync tool such as rsync is definitely
>> a better solution to the problem you're trying to solve.
>
> I'm mystified about using export on his core server. Do a checkout and
> svn update to a something like "SRCDIR" on the core server, to avoid
> the "this file is locked" issue, and use "rsync -av --exclude=.svn
> /SRCDIR/ REMOTEHOST:/TARGETDIR/" syntax to push only that updated
> code.

Rsync has the -C option for exactly this purpose - to exclude files that are
normally cvs or svn metadata and cruft left over from compiles. But look at the
list of the built in excludes to make sure it won't skip anything you need.
Rsync is also better than most means of copying into a live system because it
will construct a new copy of existing files under a temporary name and rename it
only when complete. That way, running programs never see inconsistent files and
they aren't left in an inconsistent state if the transfer is interrupted.

-- 
   Les Mikesell
     lesmikesell_at_gmail.com
Received on 2010-07-15 14:46:58 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.