มูลนิธิสื่อเพื่อเยาวชน
ว่าที่ร้อยตรี จิรศักดิ์ กรรเจียกพงษ์

Rsync client and server for Windows


cwRsync

cwRsync

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.

Download cwRsync! Download cwRsync Server! Notify me about new releases and updates!

Installation


Supported platforms: Client - Windows 9x/NT/2000/XP/2003, Server - NT/2000/XP/2003.

cwRsync comes as a zip archive containing a Nullsoft Installer package. Unzip downloaded file and run cwRsync_x.x.x_Installer.exe or cwRsync_Server_x.x.x_Installer.exe (server version) :

  1. Click Next at Welcome-page
  2. View license agreement.
  3. Select components that varies depending on package type: Client package has an optional component (Secure Channel Wrapper & Wizard). It makes creation of secure channels to cwrsync servers an easy task. Optional component OpenSSH Server in server package installs a builtin openssh server, making secure channel setup to cwrsync servers possible.
  4. Specify an installation location.
  5. Installation starts. By clicking 'Details' button, you can get more detailed information about installation. Check if everything seems ok.

You're DONE! cwRsync is installed on your machine.

cwRsync server only

You should update the configuration file according to your needs. If you have defined uploadable modules (read only = false), you have to make sure that Rsync Server has correct permissions on directories behind those modules. You can use Prep a Dir for Upload wizard from the start menu for that purpose.

cwRsync installs rsync server as a service (RsyncServer) with following parameters :

--config rsyncd.conf --daemon --no-detach


If you have chosen OpenSSH server component, ssh daemon is also installed as a service (OpenSSHServer).

Both services are owned by a local user account. Default start mode is manual.

Usage


A batch file starting rsync in a right environment is available from start menu. You can customize it according to your needs. Man pages in html format are also available from start menu. cwRsync FAQs from this site can also be helpful.

In addition, as rsync people suggest, you can try Google for resources :-) I give also some pointers to rsync website :


License/Version

This package contains components with following terms of licensing:


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)

Uninstallation


This one is easy too:
  1. Make sure that no clients are connected.
  2. Choose Uninstall cwRsync from the start menu. Again, you can monitor uninstallation process by clicking 'Details' button.
Ref :: http://www.itefix.no/phpws/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=6&MMN_position=23:23

Antidisinformation

rsync on Windows, with Strongspace

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.

Installing rsync

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.

Extracting the rsync installer to your desktop.

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.

Configuring rsync

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%.

Click the top “New...” button to add a new user environment variable.
Adding c:cwRsyncin to your 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:

Both environment variables have been added.

If you do, click OK twice and move on. If not, leave a comment and I'll try to help.

Testing

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.

  1. cd c:
  2. rsync -avz --delete "/cwRsync" [email protected]:testrsync
Warning! If you already have a directory called testrsync/cwRsync in the Home directory of your Strongspace account, then this command will delete the contents of it. This is how the --delete switch works. The details of how rsync works is beyond the scope of this article.

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.

Making your SSH keys

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:

  1. ssh-keygen -P "" -t dsa
  2. cd .ssh
  3. copy id_dsa.pub authorized_keys
  4. cd ..
  5. rsync -avz ".ssh/authorized_keys" [email protected]:.ssh/authorized_keys
  6. del .ssh/authorized_keys

Now you don't need to type your password to use rsync.

Ref :: http://www.antidis.com/articles/2005/08/windows-rsync/


หมายเลขบันทึก: 23838เขียนเมื่อ 13 เมษายน 2006 16:02 น. ()แก้ไขเมื่อ 21 พฤษภาคม 2012 11:23 น. ()สัญญาอนุญาต: จำนวนที่อ่านจำนวนที่อ่าน:


ความเห็น (0)

ไม่มีความเห็น

ไม่อนุญาตให้แสดงความเห็น
พบปัญหาการใช้งานกรุณาแจ้ง LINE ID @gotoknow
ClassStart
ระบบจัดการการเรียนการสอนผ่านอินเทอร์เน็ต
ทั้งเว็บทั้งแอปใช้งานฟรี
ClassStart Books
โครงการหนังสือจากคลาสสตาร์ท