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
    lesmikes...@gmail.com

Reply via email to