Skip to content

asw s3 sync repeatedly uploads the same, unchanged files #5216

@BLuFeNiX

Description

@BLuFeNiX

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
A certain folder in my S3-compatible storage is consistently detected as out of sync with my local source directory. ie: aws s3 sync /data/foo/ s3://my.bucket.tld/foo/ will always print dozens of lines like this, every time it is run.

upload: data/foo/bar/buzz/123.jpg to s3://my.bucket.tld/foo/bar/buzz/123.jpg

The files are identical, and I have confirmed so by hashing them locally, and then downloading a copy directly via aws s3 cp and hashing that too.

There is an interesting clue as to the nature of the bug: changing the path to be more specific will get rid of the behavior. For example, rather than running aws s3 sync /data/foo/ s3://my.bucket.tld/foo/, if you run aws s3 sync /data/foo/bar/buzz/ s3://my.bucket.tld/foo/bar/buzz/ it will show no changed files, and not upload anything. The directories are the same in both scenarios, but it seems that there is some sort of comparison against other objects in the bucket.

SDK version number
aws-cli/2.0.14 Python/3.7.3 Linux/4.19.107 botocore/2.0.0dev18

Platform/OS/Hardware/Device
Ubuntu 20.04 in a docker container

To Reproduce (observed behavior)
Unknown. It only happens with some files.

Expected behavior
Unchanged files will not be uploaded.

Logs/output
I do not wish to post full logs, but here is a relevant message:

2020-05-20 07:01:57,245 - MainThread - awscli.customizations.s3.syncstrategy.base - DEBUG - syncing: [REDACTED] -> [REDACTED], file does not exist at destination

It is the same message for every file, even though the file does exist in he destination bucket.

Additional context
It looks like this problem has existed since at least 2014, based on a similar report here:
https://forums.aws.amazon.com/thread.jspa?threadID=146851

I have also tried s3cmd, which does not exhibit this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-for-stalenessguidanceQuestion that needs advice or information.response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions