Reputation: 589
I am copying files for AWS ec2 to AWS s3 bucket, with --preserver flag to preserver to file create and modified date, but once file is copied to s3bucket, "s3cmd ls s3://bucket-name/" command list the file upload time as file time, it does not preserve the original file creation date-time. I am using following command(s3cmd put --preserve xyz.log s3://bucket-name/) to copy the file. Though s3cmd help list the --preserve or -p as something you can use to preserve the date it does not seems to be working.
Has anybody run in to this kind of issue and can point me what I am doing wrong.
I also tried s3cmd sync but sync command also behave same way, though I would prefer to use put.
s3cmd put --preserve xyz.log s3://bucket-name/
Thanks,
Upvotes: 0
Views: 2512
Reputation: 486
Please try the current upstream github.com/s3tools/s3cmd master branch. This is resolved there. Going round trip (s3cmd sync --preserve file s3://bucket/; rm file; s3cmd sync --preserve s3://bucket/file .;) now restores the atime and mtime values as stored during sync upload.
Upvotes: 2