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..
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...
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 \
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/id_dsa.pub | ssh fred@remote 'cat - >>
cat ~/.ssh/id_dsa.pub >> ~/.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
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. ;-)
Glad you got it going. :)
I think rsync and cygwin are maximus coolness and more people aught to check them out.
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.
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 08:39 AM.|