2

I'm currently using sftp to download nightly backups (.tar.gz) from my web host to my desktop computer. I think I'd like to switch to rsync to minimize the bandwidth (and time). I have cygwin installed on my PC, but don't use it for much. I have shell access to my web host via ssh (PuTTY).

Let's say my source directory is myserver.com:/home/username/backups/, I want to grab all of the .tar.gz files from there, and I want to save them to C:\Backups\ locally.

Nogwater
  • 131
  • 1
  • 5

2 Answers2

3

Use the built-in rsync on the *nix box, and DeltaCopy on the Win32 box.

Chris S
  • 77,945
  • 11
  • 124
  • 216
  • Actually, I tried DeltaCopy, but it wasn't able to connect to the remote server. Do you know how to get it to connect over ssh? – Nogwater Jun 04 '10 at 16:18
  • In the DeltaCopy Client, setup the remote server as you normally would, and under the options tab make sure 'Connect via SSH' is checked. You must have SSH keys setup so it can connect without a password. There's little guide here: http://www.aboutmyip.com/AboutMyXApp/DisplayFAQ.do?fid=1 NOTE: it says it's for moving file to *nix only, it means that it's for connecting to a *nix daemon only. – Chris S Jun 04 '10 at 17:58
  • Oh SSH keys, I'll need to find out if that's possible with my host. I'll let you know how it turns out. Thanks for the pointers. – Nogwater Jun 05 '10 at 04:41
  • Thanks for the pointer. I ended up not using DeltaCopy, but your link definitely helped me get pointed in the right direction. – Nogwater Jun 05 '10 at 17:39
1

I was able to get this working with cygwin's rsync and ssh. Here's the command I ended up with:

C:\cygwin\bin\rsync.exe -vcr -e "ssh -l username -i /cygdrive/C/Backups/sshkey" "myserver.com:/home/username/backups/" "/cygdrive/C/Backups/rsync/"

Here were some issues along the way: Added C:\cygwin\bin\ to my Windows PATH. I don't know if this was strictly necessary, but it helped me.

Chris S's link to create the key pair that's needed to allow ssh to connect without using a password.

I also needed to set some permissions of the newly created .ssh directory and file on the server...

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys/

Oh, and I needed to manually locally create ~/.ssh within cygwin.

Nogwater
  • 131
  • 1
  • 5