Results 1 to 6 of 6
I'm still getting used to Linux. I've got Ubuntu 8.04 on two machines: 1) A debranded HP Pavilion with an AMD Athlon 64 dual core 3800 and 1 GB of ...
- 06-17-2008 #1Just Joined!
- Join Date
- Apr 2008
- Location
- Omaha, Nebraska
- Posts
- 37
Don't get rsync syntax
I'm still getting used to Linux. I've got Ubuntu 8.04 on two machines: 1) A debranded HP Pavilion with an AMD Athlon 64 dual core 3800 and 1 GB of RAM
2) An HP Pavilion Pentium III with 256 MB of RAM
I've successfully copied files from one directory to another on the same machine. Now I want to get the knack of copying files from one machine to the other. I'm doing something wrong with the syntax.
The Athlon Linux machine is named tom-desktop while the Pentium III machine is named toms-jukebox.
I tried to copy from the Athlon machine to the Pentium III. So I'm on the Athlon machine on the command line in /home/tom/Documents and I want to copy the file transferthis.odt to the Pentium III. I type:
The command runs without a squawk, but then I can't find it on the Pentium III. So I decide to specify a directory. I type:rsync transferthis.odg toms-jukebox
Linux doesn't like that. I get an error saying that no such directory exists. The user name and password on the Pentium III is the same as the other, btw.rsync transferthis.odg toms-jukebox/home/tom/Documents
I obviously don't get Linux syntax yet. I would have thought it would be [machine name]/whatever/directories, but it's not.
Does someone know the syntax I should be using? Under networking I found some IP numbers. Should I be using those instead? Also, do I need to designate a directory as a shared one like you do in Windows networking?
I'm confused. If someone could clue me in and maybe point me to a page that could help me understand Linux syntax I'd be very grateful. I've googled and found numerous Linux networking pages, but haven't been able to find one that explains the command line syntax of rsync-ing from one machine to another and whether you have to share a resource first.
- 06-17-2008 #2
I think you need a colon in there..
rsync transferthis.odg toms-jukebox:/home/tom/Documents
With your command it thinks toms-jukebox is a directory under your current one.If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 06-17-2008 #3Just Joined!
- Join Date
- Apr 2008
- Location
- Omaha, Nebraska
- Posts
- 37
Thanks for the help. I think that's probably the right command. However, it did not work. Here's what I got in response to it:
I'm thinking maybe toms-jukebox has to somehow be put on the network as a shared resource? Or perhaps I have to give my login on the Athlon Linux machine ownership to toms-jukebox or file write permissions to that computer?ssh: toms-jukebox: Name or service not known
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(454) [sender=2.6.9]
- 06-17-2008 #4Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
This is an issue with name resolution. You can try either using the IP address of the remote machine or adding the relevant details to /etc/hosts so that it will be resolved correctly. However if you are using DHCP your IP addresses will be dynamic and /etc/hosts is only a band-aid. You would be better in that case either using IP addresses or running a DNS server.
- 06-17-2008 #5Just Joined!
- Join Date
- Jan 2006
- Posts
- 57
Check this:
How to backup/synchronize your files using rsync
- 06-17-2008 #6Just Joined!
- Join Date
- Apr 2008
- Location
- Omaha, Nebraska
- Posts
- 37
Many thanks for the help. I feel I'm close, but I'm still not having any luck. Here's what I did:
The result was:rsync transferthis.odt 192.168.0.102:/home/tom/Documents
I thought I had the IP right, but maybe I have it wrong. I've looked around in the networking components on both computers. In many cases I've found IP addresses that are the same on both machines. That's true if I go:ssh: connect to host 192.168.0.102 port 22: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(454) [sender=2.6.9]
I unlock it with my password, click on the DNS tab. I get the same result on both machines: 192.168.0.1. So it can't be that since it's not unique to a machine. It's a similar result if I click on the Hosts tab. On the Athlon machine I get:System ===> Administration ===> Network
On the Pentium III, the result of clicking the Hosts tab is almost identical:IP Address = 127.0.0.1, Alias = localhost
IP Address = 127.0.1.1, Alias = tom-desktop
These aren't IPs unique per machine and therefore cannot be the right ones, right? Then I did what I thought for sure yielded the right answer. I went: System ===> Administration ===> Network Tools, and clicked on Tracerroute. I put in what seems to me is the parent IP for both machines: 192.168.0.1. On the Athlon machine, the first result that pops up is:IP Address = 127.0.0.1, Alias = localhost
IP Address = 127.0.1.1, Alias = toms-jukebox.ThomasOwenMOn the Pentium III, the result is:Hostname = tom-desktop.local, IP = 192.168.0.103.I figure, Cool, "192.168.0.102" is the Pentium III's unique IP, so I plug that into the command. However, as you can see, it didn't work. I must still either have the IP wrong or messed up the syntax somehow. Where did I go wrong? Is the tracerroute not the correct way to get each machine's unique IP?Hostname = toms-jukebox.local, IP = 192.168.0.102
Btw, I'm going Applications ===> System Tools ===> Konsole to use the command line. That way I can cut and paste the result. I'd doubt doing it this way is any different from going Ctrl+Alt+F2 to use the command line, but if I should be doing it the other way, please let me know.


Reply With Quote