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.