VeeDubb Posted January 14, 2004 Report Share Posted January 14, 2004 Okay, I have two machines running different flavors of linux. One is my desktop running Mandrake 9.2 and the other is a PDA running Embedix linux. The connect through a standard usbnet networking connection. Don't miss that, it's a USB network, not an ethernet. I have both set so that the connection is brought up automaticaly when they are hotplugged together. What I want is two fold. First i want to set up a mechanism of some kind to sync a folder on the desktop to a folder on the remote linux machine with the desktop playing file server, though I want it to sync both ways. i.e., if there's new files on both i want it to send both directions so the same stuff is on both machines. I believe the best way to do this would be an rsync, but I have no idea how to do that. Networking is not my thing. the second and mayber harder thing, is that i want a script to automate it for me, and I want to make it so the script get's executed automaticaly on connection. Alternatively, the sync could be set up such that it syncs automaticaly every time there is a change, though I don't know how to dao that either. Quote Link to comment Share on other sites More sharing options...
coverup Posted January 14, 2004 Report Share Posted January 14, 2004 I know nothing about USB networks, sorry... Unison file syncroniser from http://www.cis.upenn.edu/~bcpierce/unison/ is the best app to sync folders on two comps. It does exactly what you want. You start it on one computer (desktop in your case), no need to run servers on both machines. You can sync files in any direction. It can connect over a direct socket link, an rsh or an ssh connection. Quote Link to comment Share on other sites More sharing options...
VeeDubb Posted January 15, 2004 Author Report Share Posted January 15, 2004 That sounds absolutely perfect. I'll have to take a look. Thanks for the linkage. Quote Link to comment Share on other sites More sharing options...
VeeDubb Posted January 15, 2004 Author Report Share Posted January 15, 2004 okay, it's almost perfect. It works great and there a version already compiled for the Z and a nice RPM in the contrib mirror. What I wold liek to do with it is enter one command that will tell it to sync without me having to confirm anything at all. I tried reading all the options in unison -help but that realy didn't answer my question. Do you know a way to do this? If not it's okay, unison is fantastic as is, but i'd REALY like to automate it. Quote Link to comment Share on other sites More sharing options...
Guest emetib Posted January 16, 2004 Report Share Posted January 16, 2004 from a quick look at their documentation. it looks like you can do this from a cmd line. so what you would do is to open up a file, let's call it sync, now your going to have to call it from that file with what you want to do. this is just an example, since i didn't read all of the docs. vim sync #/bin/bash unison /home/veedub/documents/thisfile whereever/thisfile unison /home/veddub/documents/thatfile whereever/thatfile unisno /home/veedub/documents/anothefile whereever/anotherfile now chmod 755 it and transfer it to the /bin dir. or an easier way to do it is to make a specific /dir on your workstation and then put all of the things that you want synced into it. vim sync #/bin/bash unison /home/veedub/mydir whereever/mydir follow the chmod and the mv and you should be set. take a look at the remote syncing, i dont' know if your trying to do it over ssh, telnet or whatever, or even just doing a cp here there on it. good luck. Quote Link to comment Share on other sites More sharing options...
VeeDubb Posted January 18, 2004 Author Report Share Posted January 18, 2004 Htank you again so much! This program is EXACTLY what I wanted and it is even better now. I already got a How-To on hot to execute a script when a specific device is hotplugged, and with this, i can have the DOCs synced and the desktop pim program opened all automaticaly when I connect. That's PERFECT!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.