How to Rsync From Window to Ubuntu (+2)

idham April 15, 2013

For you Ubuntu fans, you could rsync command from Windows to Ubuntu.

linux :
#apt-get install rsync

Window :
– Install Cygwin

Before you can use Rsync on a Windows Workstation or Windows Server, you will need to download and install the Cygwin system, with the following selections as a minimum:

(1.1) +Editors Install nano for use as a simple text editor (or install one of the others if you are familiar with them), as in the following example screen.
Cygwin Editors Selection
Click +Editors to expand the choices, then select nano.

(1.2) +Net Install Rsync and SSH as in the following example screen. (It is not installed by default and might be useful for this exercise!)
Cygwin Net Selection
Click +Net to expand the choices, then select Rsync.

(1.3) +Admin If you are planning to use Rsync as a Service under Windows, you must expand the +Admin section and select cygrunsrv NT/W2k service initiator.
Cygwin Admin Selection
Click +Admin to expand the choices, then select cygrunsrv.

Run Cygwin bash
Click Start — Cygwin — Cygwin Bash Shell

# ssh-keygen -t rsa
#ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/id_rsa.pub.
The key fingerprint is:
90:c3:0e:c1:47:67:2b:23:f5:39:e7:1d:e6:4f:5f:b4 [email protected]
The key’s randomart image is:
+–[ DSA 1024]—-+
| …o o |
| .+.= o |
| o.B = . o .|
| + = + + . ..|
| . S . o .E.|
| o ..|
| . .|
| |
| |

# scp /home/user/.ssh/id_rsa.pub [email protected] :~/root/

On Ubuntu Server

#touch /root/.ssh/authorized_keys
#cat /root/id_rsa.pub >> authorized_keys

On Windows at cygwin bash shel
#rsync -avz -e “ssh /home/user/.ssh/id_rsa” [email protected]:/home/backup/ /cygdrive/c/data/
#rsync -qruz -e “ssh /home/user/.ssh/id_rsa” /cygdrive/c/data/ [email protected]:/home/backup/

870 total views, 1 views today

Harap login untuk Vote UP postingan ini.

No comments yet

You must be logged in to post a comment.

Login to your account

Can't remember your Password ?

Register for this site!

Skip to toolbar