LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-15-2004, 09:29 AM   #1
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu 10.04, Debian Squeeze, Windoze 7
Posts: 512

Rep: Reputation: 34
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..

Markus
 
Old 05-15-2004, 01:26 PM   #2
muah
Member
 
Registered: Aug 2003
Location: Europe
Distribution: Slackware (current)
Posts: 228

Rep: Reputation: 32
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...
 
Old 05-15-2004, 02:16 PM   #3
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
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/id_dsa.pub | ssh fred@remote 'cat - >>
~/.ssh/authorized_keys'
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
 
Old 05-17-2004, 11:18 AM   #4
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu 10.04, Debian Squeeze, Windoze 7
Posts: 512

Original Poster
Rep: Reputation: 34
works!!

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. ;-)

Cheers

Markus
 
Old 05-17-2004, 01:53 PM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
Glad you got it going.

I think rsync and cygwin are maximus coolness and more people aught to check them out.
 
Old 06-23-2004, 04:39 AM   #6
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu 10.04, Debian Squeeze, Windoze 7
Posts: 512

Original Poster
Rep: Reputation: 34
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.
 
Old 06-23-2004, 07:26 AM   #7
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
Quote:
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.
 
Old 06-23-2004, 10:13 AM   #8
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu 10.04, Debian Squeeze, Windoze 7
Posts: 512

Original Poster
Rep: Reputation: 34
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...

Markus
 
  


Reply

Tags
cygwin, rsync, windows


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync Syntax Question for Connecting to Remote Windows Machine Linux31 Linux - Networking 3 10-09-2005 02:55 PM
I can't network a linux machine with a windows 2000 Server. Loco-Guzm Linux - Networking 13 03-29-2005 10:50 AM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 02:49 PM
how do i view linux server on my windows machine? fogurt Linux - Newbie 1 05-12-2004 11:21 PM
Accessing linux server from windows machine Saffsd Linux - Newbie 9 01-21-2004 09:37 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration