I want to periodically move images from a local directory to s3, but I do not want to overwrite files that were previously migrated that have not changed since. Here are the options I reviewed:
Compare the length of the content. Disadvantage: the new version of the file may have the same content length, but be different.
Save local modification information in s3 metadata for comparison in push mode. Disadvantage: this requires POST and PUT, doubling the downloaded data, adding service data to the push task and can be inconsistent when starting from different computers.
There must be a better way. What am I missing?
PS I use aws-s3 pearl in a rake problem.
source share