s5cmd icon indicating copy to clipboard operation
s5cmd copied to clipboard

`sync` command copies object everytime

Open bounlu opened this issue 2 years ago • 2 comments

Native aws s3 sync command copies the file from S3 bucket to local only once (as expected):

aws s3 sync s3://data/testfile .

But s5cmd sync copies the file everytime and overwrites:

s5cmd sync s3://data/testfile .

bounlu avatar Oct 25 '23 07:10 bounlu

same

ehudkaldor avatar Mar 14 '24 23:03 ehudkaldor

Same with 2.2.2 against MinIO even with --size-only:

$ ./bin/aws s3api head-object --bucket 's5cmd-test' --key 'path/to/libmkl_vml_cmpt.so.1' --query ContentLength
7756240
$ stat -c '%s' /home/groups/.snapshot/groups.daily.latest/path/to/libmkl_vml_cmpt.so.1
7756240

But every time I sync:

$ ./s5cmd_2.2.2 --log=info sync --size-only /home/groups/.snapshot/groups.daily.latest/path/to/libmkl_vml_cmpt.so.1 s3://s5cmd-test/path/to/libmkl_vml_cmpt.so.1
cp /home/groups/.snapshot/groups.daily.latest/path/to/libmkl_vml_cmpt.so.1 s3://s5cmd-test/path/to/libmkl_vml_cmpt.so.1
$

thiell avatar Jun 14 '24 18:06 thiell