Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Run rsync based on time difference between local file and server file




Hi Charles,


On 2011-11-11 16:52, Charles Muller wrote:
I usually synchronize my various machines via my server, manually
starting an rsync routine on startup or shutdown of Linux.

I was thinking that I might be able to automate this by having a script
that compares the time stamps of a designated file on the server with a
designated local file, and then depending on if there is a difference,
and if so, which way, the appropriate rsync routine would start up.


I was previously syncing two computers via a SSD hard disk using Unison (actually, Unison-GTK since I'm too lazy to use command line :-P ) and it seemed to always get things correct. Now, one of those computers is gone, but back then, it would get it right even if I was sloppy and edited a different file in both computers. I guess it was calculating some kind of key on each file.

Behind the scenes, Unison uses rsync. Also, I just looked at the manpages of unison and it supports syncing between two hosts. [I have never used it this way.]

You might want to look into it to see if it fits your needs. Of course, you will have to set exclusions on each side [such as gnome/kde settings that are specific to a particular computer].

Though I have no complaints, I welcome other alternatives if you can think of any. Please let me know if you find something better!

Ray



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links