Lets say, I wrote a script to do synchronization between local drivers of my N computers and Storj.
I copy files to storj with command
uplink cp file sj://AAA/BBB
Now I have this situation:
- File A for local disk of computer C1 with modification timestamp 2020-01-01, copied to storj with timestamp 2022-01-12 (today).
- File A for local disk of computer C2 with modification timestamp 2021-01-01, copied to storj with timestamp 2022-01-13 (tomorrow) and overwrite previous version.
- I am trying to sync computer C1 with Storj. How can I determine if file A on Storj is the original from C1 or has been modified, so C1’s file A must be overwritten from file A on Storj? Usually sync algorithms take advantage of size and date but here date is not exist as I expected.
Dirty workaround: keep for each computer the timestamp of last sync. If a file is newer than that timestamp, prevails.
Just for curiosity, is there anything better?