USBSYNC 0.6 README ------------------ INTRODUCTION I created usbsync because I could not find a suitable program to keep my several computers syncronized. I have all my working files on my 256MB usb drive, which I always carry around. So whenever I want to start working, I will only have to use this script to syncronize the current (Linux) computer, modify or create any files I want and then sync the contents of the usb drive. This version of usbsync (0.6) is made to be as easy to use as possible. Pre-0.5 versions were not clean code: they had lots of nested "if...fi" statements which made code near impossible to understand. They _did_ work despite that. I had no intention to release them, however. INSTALLATION In order to use this script you will have to have "rsync" and "bash" installed. Every Linux distro should have them installed already, or at least have them available in the package repositories. To make the script work, just copy it to anywhere in your PATH. I prefer either $HOME/bin or /usr/local/bin. Alternatively you can call the script from any other directory with a command line argument such as /path/to/my/usbsync-0.6. Also make sure that the script is executable: chmod 755 /path/to/my/usbsync-0.6 You can copy the supplied icons where you wish, for example /usr/local/share/Icons. USING THE SCRIPT To rsync the /media/usbstick directory to $HOME/usbstick: usbsync-0.6 -fromusb To rsync $HOME/usbstick to /media/usbstick: usbsync-0.6 -tousb If you do not have a /media/usbstick directory, or do not want to syncronize your usb drive to your $HOME, then you'll have to modify the variables in the beginning of the script. You can also symlink your real usb drive mountpoint to /media/usbstick to fool the script. Usbsync automatically does a rsync dry run and asks if you want proceed. This way you know what rsync is going to do and don't end up destroying your files voluntarily. Note that the script creates an empty file, .synctime, for it's own use, to show when the drive was last synced. This timestamp file will not exist the first time you sync, so you'll get a (harmless) error message. NOTE: If your computers not connected to the Internet, make sure that their internal clocks are accurate. Rsync bases it's decisions on file timestamps, and if your clock is screwed, then most likely rsync will eventually replace newer files with older ones IF you move you files between computers with differing time. If this is your case, take a look at rsync's man page and modify the rsync commands (normal and dry-run) to use file size as a criterion for updating it instead of using file timestamp. If you have any problems with this script, or want to report any bugs, then feel free to mail me at utu fi, my id is sjsepp. Samuli Seppänen