libcloud icon indicating copy to clipboard operation
libcloud copied to clipboard

Versioning or unique object identifiers in storage

Open nokados opened this issue 1 year ago • 1 comments

Feature Request

I want to synchronize my local files with different cloud storages. So, for this I would like to have some mechanism to check if a file in the cloud differs from my file. Unfortunately, I could not find any appropriate feature in libcloud.

I propose using the same hash method for all storage drivers and make it public, so anyone can check if file is the same in a local system and in any cloud.

However, this approach doesn't allow to determine where the file was changed, so, alternatively, we can use modify_time from os.stat(file).st_mtime or, maybe, you have a better idea.

nokados avatar May 13 '24 14:05 nokados

If you choose hash option, it seems pretty easy, because most of the providers use data_hash from StorageDriver._upload_object, except LocalDriver, which uses md5(modify_time), and, maybe, some else.

nokados avatar May 13 '24 14:05 nokados