cwRsync is a yet another packaging of Rsync and Cygwin. You can use cwRsync for fast
remote file backup and synchronization.
Rsync uses the Rsync algorithm which
provides a very fast method for bringing remote files into sync. It
does this by sending just the differences in the files across the
link, without requiring that both sets of files are present at one
of the ends of the link beforehand. At first glance this may seem
impossible because the calculation of diffs between two files
normally requires local access to both files.
Rsync normally uses ssh for communication. It requires no special
privileges for installation. You must, however, have a working ssh
system.
Alternatively, rsync can run in `daemon' mode, listening on a
socket. This is generally used for public file distribution,
although authentication and access control are available.
Cygwin is a Linux-like environment for Windows. It
consists of a DLL (cygwin1.dll), which emulates substantial Linux
API functionality, and a collection of tools.
--config rsyncd.conf --daemon --no-detach
Component | Version | Licensing | In short | |
Rsync | 2.6.7 | Rsync license | Free to use (GPL) | Download source |
Cygwin and GNU tools | 1.5.19-4 | CYGWIN license | Free to use (GPL mostly) | Download source |
OpenSSH | 4.3p2-2 | OpenSSH license | Free to use (BSD) | |
OpenSSL | 0.9.8a-1 | OpenSSL license | Free to use (BSD) | |
cwRsync (the rest!) | 2.0.6 | cwRsync license | Free to use (MIT License) |
If you're on Windows, and you'd like to be able to use rsync with your Strongspace account, read on. This article will show you how to install and configure rsync on your Windows machine, and how to set up SSH keys on Strongspace so that you don't need to type in your password every time you use rsync. It assumes you're running a decent version of Windows, namely Windows XP, Windows Server 2003 or Windows 2000. I've tested it with Windows XP SP2.
Thanks go to Phil Brennan for telling me about the particular build of rsync used here, both Phil and Des Traynor for proof reading, and Marten Veldthuis for helping to fix some technical errors.
You need to download a Windows version of rsync. The best one I've found, in that it works, is called cwRsync. You can download the installer from Sourceforge.
The installer is contained inside the zip file. You'll need to extract the installer before you can use it. Go to where you have downloaded the zip file, right-click on it and choose "Extract all...". A dialogue box will pop up; just click Next, Next and Finish.
Open up the new folder and double-click the installer. It's pretty standard stuff - if you've ever installed a Windows program before, you shouldn't have any problems. I recommend you install it into c:cwRsync; the default location of c:Program FilescwRsync can cause some odd problems. For the rest of the article, I'm going to assume you've installed it to c:cwRsync.
rsync is now installed. Now let's set up some environment variables to make everything work.
Go to the Control Panel and open up System (if you're not using the classic view, you can find it in the Performance and Maintenance section). Click on the Advanced tab, and at the bottom you should see a button labelled Environment Variables. Click on it.
You need to set up two environment variables. Firstly, you need to add the directory c:cwRsyncin to your path. You can do this by creating a new user environment variable called PATH and giving it the value c:cwRsyncin;%PATH%.
In the same way, you need to add another user environment variable called RSYNC_RSH with the value ssh.exe. When you are finished, you should see something like this:
If you do, click OK twice and move on. If not, leave a comment and I'll try to help.
Open up a command prompt with "Start", "Run..." and "cmd". Run the commands below, changing username to your Strongspace username and subdomain to your Strongspace subdomain. This command will create a directory called testrsync in your Strongspace, and upload the directory c:cwRsync to it using rsync.
You'll be asked if you want to continue connection (type "yes" and hit enter) and then asked for your Strongspace password. Type that, hit enter, and you should see files begin to upload. Login to Strongspace and make sure the files from c:cwRsync are there. If so, rsync is now working! If not, leave a comment.
If you don't want to provide a password every time you use rsync, you can set up SSH keys. There's a good explanation of what these are at the PuTTY page on using public key authentication.
Make a new folder in your Strongspace Home account, named ".ssh". Open a new command prompt. You should be in your home directory (in my case, C:Documents and SettingsDavid Barrett). If not, cd to it. Then run the following commands:
Now you don't need to type your password to use rsync.
Ref :: http://www.antidis.com/articles/2005/08/windows-rsync/
ไม่มีความเห็น