peak / s5cmd

Parallel S3 and local filesystem execution tool.
MIT License
2.71k stars 241 forks source link

Introduce a flag to preserve timestamps of files and preserve file ownership #710

Closed Ahuge closed 8 months ago

Ahuge commented 8 months ago

This PR is a wrap up of #534 plus a flag to preserve file ownership.

This has been rebased off of master as well.

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.

The --preserve-ownership flag will query the user and group and store that in S3 as metadata. On Windows this stores the SID, on linux this stores the uid/gid.

Please let me know if you have feedback on this PR. Thanks!

Ahuge commented 8 months ago

Linked to #532 as well

Ahuge commented 8 months ago

Hold on this, I'll be rebasing and resubmitting