-
Notifications
You must be signed in to change notification settings - Fork 239
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
Introduce a flag to preserve timestamps of files #534
base: master
Are you sure you want to change the base?
Conversation
The `--preserve-timestamp` flag will set metadata on the s3 objects and then update the files on disk during a download. If the `--preserve-timestamp` flag is passed during an upload the following metadata keys will be set: - x-amz-meta-file-ctime - x-amz-meta-file-mtime - x-amz-meta-file-atime If the `--preserve-timesamp` flag is passed during a download, s5cmd will attempt to modify the created files on disk. **There doesn't appear to be a way to change the created date on Linux
I'd love to see this merged - @Ahuge could you rebase it and maybe ping a maintainer to try again for a review? |
Hi @Ahuge, thanks for the PR. With the addition of #621 and the request #350, I think these two could be handled in a similar fashion as s5cmd specific file metadata. I have a PoC which is not ready for a review yet. I would like to get your thoughts on it once it is ready. I kindly request for you to wait for it to get your thoughts if it would cover yours and @strophy's use cases. |
Hi @seruman just checking on progress and if there is anything I can do to help move this issue along? Having this feature would allow us to switch back to s5cmd from aws-cli, with big performance benefit. |
Seems needs rebase, again |
The current code does not work as it passes the --preserve-timestamp flag to the "rm" command during sync and "rm" command does not support it. |
I've slightly modified the original code from @Ahuge to use the last_modified date if present in the metadata when comparing objects with same name and same size during "sync" operation.
|
Having a strange bug with Will be happy to help if any other debug data needed from my side, I would love to see this feature merged
|
This PR is in response to issue #532
We are implementing a flag that when activated will record and store ctime, mtime, and atime in S3 as metadata on the object.
When pulling files down, if that data exists, we will set it on the files as well.
Linux & Darwin don't appear to allow setting of ctime, however atime and mtime are preserved.
Windows does allow us to set ctime, mtime, and atime, however they are actually referred to as CreationTime, LastAccessTime, and LastWriteTime.
Please let me know if you have feedback on this PR.
Thanks!