×


Transfer Files with Rsync on Windows using SSH connection

Are you trying to transfer files using Rsync from Windows to Linux over SSH? 

This guide will help you.


Users must be able to see their files as a Windows share using Windows, OSX, or Linux. The sync must still work from the Linux CLI. Once the files have been synced, users will delete them from their Linux systems. Files must remain on Windows, where they will be backed up to tape.

Over the years we have assisted many customers to transfer and synchronize data between different machines using the rsync command.

Even though the rsync protocol can be pretty simple to use, some of its more advanced features may surprise you.


Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform Rsync related queries.

In this context, we shall look into how to perform Rsync from Windows to Linux over SSH.


Facts about Rsync and SSH ?

We can use rsync to transfer and synchronize data between different machines and directories. Using the Secure Shell (SSH) protocol, we can copy the files securely to another location.

Compared to other methods for copying files, the Rsync tool has many benefits. It uses both compression and decompression to send and receive files.

In addition, the tool only transfers new or updated files saving on bandwidth and bringing faster transfer times.


Rsync from Windows to Linux over SSH

Although Rsync is built to run on Unix-like systems, we can use it on Windows. With the help of Cygwin which produces a wonderful Linux API, we can run rsync. Depending on the computer we can either download the 32-bit or 64-bit version.

We can install rsync and ssh using Cygwin

Now let us see how our Support Experts perform this.


Steps to install Cygwin:

1. Download Cygwin from http://www.cygwin.com/ and install it on the machine we are performing the backups.

2. When prompted accept all the defaults to download from the internet > Accept the install directory C:cgywin64 > Install for All users > Set the local Package Directory to the Desktop > Internet = Direct Connection > Choose a Download site > Next.

3. Then select Expand Net as packages.

4. Select openssh and rsync to install.

5. In Expand shells > Select bash to install > Complete the installation.


We can perform rsync operation using the command given below:

rsync /cygdrive/c/users/Owner/Pictures/ -av -e ssh xyz@192.168.1.10:/var/files/ImageSync/

Here, /cygdrive/c/users/Owner/Pictures/ is the location of files in Windows machine. Whereas, /var/files/ImageSync/ is the location of files in Linux machine.


[Need urgent help with rsync files transfer? We'd be happy to assist. ]


Conclusion

This article will guide you on steps to perform Rsync from Windows to Linux over SSH.

#Rsync can use #SSH as a secure transport agent. Make sure rsync is installed by opening a #terminal session and typing rsync --version on each machine.

Most #Linux distributions can now read the FAT32 or NTFS disk formats natively, so you could copy your files to an external hard drive formatted in Windows with either of those file systems, which will then allow you to read the data back easily in Linux.

1. cwRsync is an implementation of rsync for Windows. 

2. rsync uses a #file #transfer technology specified by the rsync algorithm, transferring only changed chunks of files over the network. 

3. #cwRsync can be used for remote file #backup and #synchronization from/to Windows systems.