-   Linux - General (
-   -   Linux Server backuping Windows machine over Rsync? (

browny_amiga 05-15-2004 10:29 AM

Linux Server backuping Windows machine over Rsync?
I want to backup the data from my few unfortunate windows machine to my central linux server. I experimented with rsync on linux and would love to use it.
After installing OpenSSH on the windoze box, the linux machine is trying to access it with rsync, but cannot.

Does anybody know what the windows (xp) machine has to run besides OpenSSH to accomplish that?
I don't want to run rsync on the windows machine and "push" it to the linux machine, since there are much too many reinstalls in windows to make it efficient. Also, the task sheduler in windows is a monster that I do not like to get to know.
If this can be done with cygwin (don't have any clue about that yet), how could I run a minimum of it, so it does not hog the (already strained) win CPU?

Grateful for any pointers..


muah 05-15-2004 02:26 PM

If you want to use rsync u need to have it installed on both machines. And as far as I know there is no rsync for Windows so u ll have to search for different solution...

homey 05-15-2004 03:16 PM

Here's my notes from the last time I setup cygwin to rsync Windows files up to a Linux computer.

Note: replace "remote" with the name or ip address of Windows computer.

Download the cygwin packages to a folder and run setup.
The ssh package is in the net selection.
After cygwin is installed, click on the cygwin icon and run these commands;
type: ssh-host-config -y
type: cygrunsrv -S sshd
type: ssh localhost

Check to make sure the service is started...
My Computer \ Control Panel \ Administrative Tools \ Services.....
Cygwin sshd set to automatic and under the Log On tab, set it to run as a service.

Right click on My Computer \ Properties \ Advanced tab \
Environment Variables....
Variable Name: CYGWIN
Variable Value: ntsec tty
Edit: Path to add ;c:\cygwin\bin;c:\

Set up the secure key from the Linux computer while logged on as the same account on the Windows computer. When asked for a key phrase, press the enter key ( blank ) to allow you to connect without entering the key phrase or password. Very useful for cron scheduling.
ssh-keygen -t dsa -f ~/.ssh/id_dsa
cat ~/.ssh/ | ssh fred@remote 'cat - >>
cat ~/.ssh/ >> ~/.ssh/authorized_keys

To upload the files to the Linux computer from the Windows computer, use the following syntax...
rsync -e ssh -avzr fred@remote:c:/mydirectory /home/fred

To download file from the Linux computer to the Windows computer, use the following syntax....
rsync -e ssh -avzr /home/fred fred@remote:c:/mydirectory

browny_amiga 05-17-2004 12:18 PM

Thanks a lot for these pointers.

After following your instructions, I got it running like a wonder.

Now my linux server is helping my "security challenged" windows. ;-)



homey 05-17-2004 02:53 PM

Glad you got it going. :)

I think rsync and cygwin are maximus coolness and more people aught to check them out.

browny_amiga 06-23-2004 05:39 AM

Here I got a good one:

when getting files with rsync from win xp professional (if that can be called professional ;-) to a linux machine, rsync tells me on linux:

Received disconnect from XX.XX.XX.XX: 2: Licensing limits exceeded.
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)

My script on the linux machine calls rsync twice, the first time it works, the second I receive this error.

Now, who is blocking me with licenses? XP? cygwin? OpenSSH or rsync? (and therefore needs replacing with a open source clean free alternative)

I know that XP does have some DUMB limits when it comes to incoming connections, so you cannot misuse it as a server.

homey 06-23-2004 08:26 AM


Now, who is blocking me with licenses? XP? cygwin? OpenSSH or rsync? (and therefore needs replacing with a open source clean free alternative)
I'm not sure what is going on there but it sounds like the first connection may not have timed out completely when the second on is used. I wonder why your script calles rsync twice.

browny_amiga 06-23-2004 11:13 AM

Well, it is maybe still a little imperfect.
I call it twice to get two different directories. Is there a way to give rsync a file which contains the dirs one wants to sync?

I found out BTW that with a 10 second delay between the action it will work.

So is XP so crappy that it will not allow me two concurrent connections? What a load of garbage! So I would need to shell out even more to buy a server edition.... Incredible. I predict that Linux will grow, grow and grow...


All times are GMT -5. The time now is 04:19 AM.