On Wed, Apr 06, 2016 at 09:12:21AM +0100, Mark Rogers wrote:
On 5 April 2016 at 14:26, Chris Green cl@isbd.net wrote:
I don't need real-time synchronisation like that provided by btsync, syncthing or pulse. The directory trees are really too big for this sort of thing anyway.
How big are they?
Well the 'obvious' tree to do it to is about 300Mb and 4000 files, however I could actually cut it down to 36Mb and 1400 files if really necessary.
I have some very large trees synced using btsync.
I would prefer to use syncthing but it had a number of limitations last I checked and btsync worked far better for me. That said, if you were to use syncthing it (by default, last I checked) doesn't use inotify to detect file changes but scans the directory tree periodically, and that period can be changed, so i think it could so the once-per-hour that you've suggested.
That sounds a reasonable approach as the scenario in my case is that I'd be editing files either at one end or the other end, very unlikely to switch from one to the other in quite a long period.
It's biggest down side is that from memory it doesn't do an rsync-style transfer of differences but transfers the whole file - although I might be wrong or out of date on that. I recall this being one of the reasons I ended up with btsync.
That probably isn't a big issue for me, the files that will change are mostly small text files (a few kb).
I can do much of it using rsync with the --update option run first one way and then the other, this does nearly everything I want but there is one gotcha - files deleted will re-appear. File deletions will not be frequent but they will occur occasionally.
This description is pretty much why unison was created. In other words your use case is pretty much perfect for unison.
Hmm, it doesn't seem so well suited to automating (scripts run from cron) as rsync does though. I will take a longer look though.
Has anyone come across anything that might do something like I want?
In the absence of alternatives others might suggest I'd go with btsync or unison. The limitations of either are probably less difficult to work around than struggling along with rsync or scripting something of your own.
Yes, that's why I've been looking. Thanks for the helpful feedback.