When I copy a file from Linux to an AWS bucket the Modtime is the last modification time of my file on Linux. I would like change the Modtime during upload to AWS to the time when the file was uploaded to the bucket.
( similar as when I do the copy of the file to the bucket with the S3 Explorer from AWS).
This is what I have done:
rclone copy -vv test1.txt s3:newsflash2
after the upload the mod date is the old linux date: 2021-02-25
rclone lsf --format "tsp" s3:testbucketnils --include=test2.txt
Is there a flag that I can use in order to change the moddate during upload to AWS to date when the transfer took place (upload date to the bucket)?
I tried with all kinds of flag, but without any luck:
What is your rclone version (output from rclone version)
os/version: amazon 2018.03 (64 bit)
os/kernel: 4.14.238-125.422.amzn1.x86_64 (x86_64)
Which cloud storage system are you using? (eg Google Drive)
The command you were trying to run (eg rclone copy /tmp remote:tmp)
You have the right flag but provided no actual logs or whatnot to help you out
Uses no extra transactions.
Modification time becomes the time the object was uploaded.
For many operations this is sufficient to determine if it needs uploading.
Using --update along with --use-server-modtime, avoids the extra API call and uploads files whose local modification time is newer than the time it was last uploaded.
Files created with timestamps in the past will be missed by the sync.
rclone sync --update --use-server-modtime /path/to/source s3:bucket
Thanks for all the infos. So it seems it is not possible what I wanted to achieve.
My goal was to list in my AWS bucket all files which have been uploaded after a certain date. I thought I could use the modtime for this. This will not work, because it seems I cannot update the modtime. Reclone will always show the Linux last modification time ( e.g. the time when I created the file on my Linux server).
The strange think is that if I upload the same file with my Aws explorer ( or boto3) the mod time is the date when I uploaded the file to Aws and not the Linux creation date. This is why I thought it must also be possible with reclone copy to do this.