• Synchronising directories on more than two PCs

    Home » Forums » Outside the box » Fun Stuff » Synchronising directories on more than two PCs

    Author
    Topic
    #469607

    This is a real-life ‘puzzle’!

    Problem 1

    I have three PCs, A, B and C, each of which contains a directory DIR to which changes (additions, updates and deletions) may be made by that PC during the day.

    I am interested at the end of each day in ensuring that the DIR directory on each PC contains exactly the same files at exactly the same update levels.

    I have a program that will synchronise the DIR directory between two PCs.

    What sequence of synchronisation runs must I do between the three PCs to achieve this result with the minimum amount of effort (that is, least number of synchronisation program runs and/or least amount of file copying)?

    Problem 2

    Once Problem 1 is sorted out, let us introduce an external hard drive connected to one of the PCs, or a NAS box on the LAN, I don’t think it matters which.

    Assume now that this external hard drive/NAS box contains the ‘master copy’ of the directory DIR, and at the end of the day we want to reflect all the changes that have been made on each PC to its own copy of the DIR directory. Here we must do more synchronisations runs, now between four ‘devices’, the three PCs and the external hard drive/NAS box, to ensure that all four copies of the DIR directory are identical. Is this problem similar to the first one, but now between four devices?

    I have worked out an answer (I think) to Problem 1, but for Problem 2, “my brain hurts”!

    I’d be interested in what people come up with…

    BATcher

    Plethora means a lot to me.

    Viewing 9 reply threads
    Author
    Replies
    • #1229243

      Dropbox.com offers such a service–free for 2 GB. Check it out at https://www.dropbox.com/referrals/NTc1NTY0NDU5

    • #1229268

      This is a real-life ‘puzzle’!

      Problem 1

      I have three PCs, A, B and C, each of which contains a directory DIR to which changes (additions, updates and deletions) may be made by that PC during the day.

      I am interested at the end of each day in ensuring that the DIR directory on each PC contains exactly the same files at exactly the same update levels.

      I have a program that will synchronise the DIR directory between two PCs.

      What sequence of synchronisation runs must I do between the three PCs to achieve this result with the minimum amount of effort (that is, least number of synchronisation program runs and/or least amount of file copying)?

      Problem 2

      Once Problem 1 is sorted out, let us introduce an external hard drive connected to one of the PCs, or a NAS box on the LAN, I don’t think it matters which.

      Assume now that this external hard drive/NAS box contains the ‘master copy’ of the directory DIR, and at the end of the day we want to reflect all the changes that have been made on each PC to its own copy of the DIR directory. Here we must do more synchronisations runs, now between four ‘devices’, the three PCs and the external hard drive/NAS box, to ensure that all four copies of the DIR directory are identical. Is this problem similar to the first one, but now between four devices?

      I have worked out an answer (I think) to Problem 1, but for Problem 2, “my brain hurts”!

      I’d be interested in what people come up with…

    • #1229269

      Pose your problem to Syncback tech support at:
      support@2brightsparks.com. They have the best software I’ve found to sync files between computers.

      Allan

    • #1229307

      Here are two more:

      Karenware’s Replicator

      Microsoft Live Mesh Beta

      Dropbox is probably the easiest to use–I’d start there. However, I’m not sure how it will handle the drive being removed/reattached. You may want to use Dropbox or Live Mesh for the 3 computer sync, and then use either Syncback or Replicator to sync the drive when it’s attached.

    • #1229329

      Dropbox is an option, but I like Microsoft’s free Synctoy utility – ALOT!
      Synctoy is fast, easy, flexbile and just “works.”

      http://www.microsoft.com/downloads/details.aspx?familyid=C26EFA36-98E0-4EE9-A7C5-98D0592D8C52&displaylang=en

      Good Luck.

    • #1229362

      Thanks to all for their backup ‘solutions’ – but this was intended originally as a ‘logic puzzle’, which was why it was in the Puzzles Forum!

      Problem A
      Let us assume for the sake of simplicity that “sync” means a two-way synchronisation of data between two PCs.

      My initial plan was a sort of ’round robin’:

      * Sync A with B
      * Sync B with C
      * Sync C with A
      * Sync A with B
      A, B and C are now fully up-to-date with all changes (I think!)

      but a better solution is always to run on the PC called A, better because then you don’t have to serialise sync runs across multiple PCs

      * Sync A with B
      * Sync A with C
      A is now fully up-to-date with all changes
      * Sync A with B
      * Sync A with C
      B and C are now fully up-to-date with all changes

      There is an even simpler solution which just requires three passes, but conceptually it is a bit more difficult to understand:

      * Sync A with B (both A and B contain the same changes)
      * Sync B with C (both B and C contain the same changes, but now differ from A)
      * Sync A with B (A is now updated with the combined changes from B and C)

      With regard to programs to achieve this result, I used to use Microsoft’s SyncToy 2.1 (and its predecessors, for some years), but recently I had a problem where one PC became inaccessible during a run – and SyncToy wiped out a directory on the PC on which it was running. So it’s a bin job for SyncToy. You can’t have data backup solutions that incorrectly delete files.

      Of the synchronise and backup solutions, you could use Microsoft’s accomplished RoboCopy in ‘both directions’, but for a single both-way program I rather like SyncBack (and thus agree with Allan), and the documentation and technical support from them is absolutely superb! It is very flexible in what you can select to copy, will handle open files via VSS, but (for the above purpose) it will only synchronise between two PCs.

      On the other hand, Allway Sync will synchronise a single directory structure between a number of PCs / external hard drives / NASes in the same run. You don’t get any control over omitting stuff you don’t want copied, though. Synchronising multiple directories requires creating one job per ‘directory’ (this includes lower-level directories, of course). You can clone the jobs and just change the directory paths for each PC, which makes it fairly straightforward. A major flaw is that it doesn’t handle open files, yet. And the documentation is ‘sparse’.

      Each of these products costs around $30 if you want to use them for anything other than moderate amounts of data (Allway Sync Pro) or want some slightly more sophisticated options (Syncback SE), but they are probably worth it. Horses for courses.

      Just for completeness, the best answer to Problem 2, assuming the eXternal hard drive (or NAS boX) is called X, could be:

      * sync A with X
      * sync B with X
      * sync C with X
      * sync B with X
      * sync A with X

      I’m sure if anyone objects to any of the above, they will say so!

      [Moderators – perhaps this should be moved into the Security & Backups forum?]

      BATcher

      Plethora means a lot to me.

    • #1229385

      This is a real-life ‘puzzle’!

      Problem 1

      I have three PCs, A, B and C, each of which contains a directory DIR to which changes (additions, updates and deletions) may be made by that PC during the day.

      I am interested at the end of each day in ensuring that the DIR directory on each PC contains exactly the same files at exactly the same update levels.

      .

      If syncs are done on the basis of newer replaces older, what you will do is lose any updates made by any two of the PCs.

      If PC A, B & C start with the same files

      A updates file X at 10:00
      B updates its version of X at 10:30
      C updates its version of X at 11:00

      A syncs with B, so loses its changes to X
      B syncs with C, so loses its changes to X
      A syncs with B, so loses B’s changes to X, and now has the same version of X as C.

      Wouldn’t that be a problem?

    • #1229386

      Great post! I’m surprised that “SyncEXP” wasn’t mentioned. I’ve been using it the past couple years to keep my 3 desktops + 2 laptops all in sync. I don’t have a NAS, so instead sync my “master” desktop with Ext HDD backup after it’s been updated. SyncEXP has a batch mode that I’ve never tried that might even make this process easier.

    • #1230377

      I have three PCs, A, B and C, each of which contains a directory DIR to which changes (additions, updates and deletions) may be made by that PC during the day.

      I am interested at the end of each day in ensuring that the DIR directory on each PC contains exactly the same files at exactly the same update levels.

      Trouble is: what you are describing is unsolvable by the sort of synchronization being discussed. You are venturing here into why file systems provide file- and record-locking, and why database management systems provide serialization mechanisms for changes. Crude synchronization cannot prevent collision of changes that are effectively concurrent (i.e. occur between syncs) and cannot interpret other sorts of collisions — say, for instance that File XYZ gets updated in one copy during the same interval that it’s deleted from another — which of these changes should prevail? So, you definitely need a master that really is a master (which is to say that all changes are serialized through it and immediately propagated from it) and you’d pretty much have to use the cloud to accomplish that.

    • #1231025

      To all,
      I know a solution that will Sync an almost unlimited number of directories across an almost unlimited number of machines across a network and it only needs to be run ONCE!!! It’s an opensource (freeware) program called Syncless (http://code.google.com/p/big5sync/). Once set up, you can sync the multiple directories all in one operation by pressing the “Sync Now” button or you can switch from “Manual” to “Seamless” and have a live, real-time sync as anything changes. Once you go to “Seamless” it becomes “set and forget” and everything is always in sync. If you watch this http://www.youtube.com/watch?v=i30Q2U7ceWs short video you’ll get a feel for how it works.
      Stu

    Viewing 9 reply threads
    Reply To: Synchronising directories on more than two PCs

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: