Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versioning or unique object identifiers in storage #2010

Open
nokados opened this issue May 13, 2024 · 1 comment
Open

Versioning or unique object identifiers in storage #2010

nokados opened this issue May 13, 2024 · 1 comment

Comments

@nokados
Copy link

nokados commented May 13, 2024

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
Copy link
Author

nokados commented May 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant