We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mirror
mc mirror should upload a file if its content (or at least timestamp) differs from destination.
mc mirror
mc mirror considers a file up-to-date if its size matches, even if contents and timestamps differ. Specifying --md5 does not help.
--md5
Here's my session:
Prepare files:
$ mkdir .minio-staging-dir $ cp --archive examples examples-staging tests/jobs tests/models .minio-staging-dir
Compare the problematic file in source and destination. Note size is the same but timestamp differs:
$ docker run --network=host -e HOME=$HOME -i -v $HOME:$HOME -u 1000:1000 -v `pwd`:`pwd` -w `pwd` minio/mc:RELEASE.2020-08-20T00-23-01Z ls --json minio/test-data/examples/katib/Hyperparameter\ Tuning.ipynb | jq . { "status": "success", "type": "file", "lastModified": "2020-10-22T08:04:46.023Z", "size": 25161, "key": "Hyperparameter Tuning.ipynb", "etag": "6ba32f481266661d8f06eb8e3c895801", "url": "http://localhost:9000/test-data/examples/katib/Hyperparameter Tuning.ipynb", "versionOrdinal": "1st" } $ docker run --network=host -e HOME=$HOME -i -v $HOME:$HOME -u 1000:1000 -v `pwd`:`pwd` -w `pwd` minio/mc:RELEASE.2020-08-20T00-23-01Z ls --json .minio-staging-dir/examples/katib/Hyperparameter\ Tuning.ipynb | jq . { "status": "success", "type": "file", "lastModified": "2020-10-22T08:25:06.427073929Z", "size": 25161, "key": "Hyperparameter Tuning.ipynb", "etag": "", "url": ".minio-staging-dir/examples/katib/Hyperparameter Tuning.ipynb", "versionOrdinal": "1st" }
Run mirror:
$ docker run --network=host -e HOME=$HOME -i -v $HOME:$HOME -u 1000:1000 -v `pwd`:`pwd` -w `pwd` minio/mc:RELEASE.2020-08-20T00-23-01Z --debug mirror --md5 --overwrite .minio-staging-dir/ minio/test-data mc: <DEBUG> GET /test-data/?location= HTTP/1.1 Host: localhost:9000 User-Agent: MinIO (linux; amd64) minio-go/v7.0.5 mc/2020-08-20T00:23:01Z Authorization: AWS4-HMAC-SHA256 Credential=minio/20201022/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=**REDACTED** X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 X-Amz-Date: 20201022T095139Z Accept-Encoding: gzip mc: <DEBUG> HTTP/1.1 200 OK Transfer-Encoding: chunked Accept-Ranges: bytes Content-Type: application/xml Date: Thu, 22 Oct 2020 09:51:39 GMT Server: Minio/RELEASE.2018-02-09T22-40-05Z (linux; amd64) Vary: Origin X-Amz-Request-Id: 164047B2984DA842 mc: <DEBUG> Response Time: 781.888765ms mc: <DEBUG> HEAD /test-data/ HTTP/1.1 Host: localhost:9000 User-Agent: MinIO (linux; amd64) minio-go/v7.0.5 mc/2020-08-20T00:23:01Z Authorization: AWS4-HMAC-SHA256 Credential=minio/20201022/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=**REDACTED** X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 X-Amz-Date: 20201022T095139Z mc: <DEBUG> HTTP/1.1 200 OK Connection: close Accept-Ranges: bytes Content-Type: text/plain; charset=utf-8 Date: Thu, 22 Oct 2020 09:51:39 GMT Server: Minio/RELEASE.2018-02-09T22-40-05Z (linux; amd64) Vary: Origin X-Amz-Request-Id: 164047B2A8756081 mc: <DEBUG> Response Time: 243.201644ms mc: <DEBUG> GET /test-data/?delimiter=&encoding-type=url&fetch-owner=true&list-type=2&prefix= HTTP/1.1 Host: localhost:9000 User-Agent: MinIO (linux; amd64) minio-go/v7.0.5 mc/2020-08-20T00:23:01Z Authorization: AWS4-HMAC-SHA256 Credential=minio/20201022/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=**REDACTED** X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 X-Amz-Date: 20201022T095140Z Accept-Encoding: gzip mc: <DEBUG> HTTP/1.1 200 OK Transfer-Encoding: chunked Accept-Ranges: bytes Content-Type: application/xml Date: Thu, 22 Oct 2020 09:51:40 GMT Server: Minio/RELEASE.2018-02-09T22-40-05Z (linux; amd64) Vary: Origin X-Amz-Request-Id: 164047B2B739809B mc: <DEBUG> Response Time: 558.462025ms Total: 0 B, Transferred: 0 B, Speed: 0 B/s
Note the 0 B transferred above. File at destination is untouched.
0 B
mc version RELEASE.2020-08-20T00-23-01Z
The text was updated successfully, but these errors were encountered:
@porridge ,
This is duplicate of #3331. This problem has been fixed by PR #3402 in Sept, 2020. Please upgrade your mc to the latest.
Sorry, something went wrong.
Closed.
ebozduman
No branches or pull requests
Expected behavior
mc mirror
should upload a file if its content (or at least timestamp) differs from destination.Actual behavior
mc mirror
considers a file up-to-date if its size matches, even if contents and timestamps differ.Specifying
--md5
does not help.Steps to reproduce the behavior
Here's my session:
Prepare files:
Compare the problematic file in source and destination. Note size is the same but timestamp differs:
Run mirror:
Note the
0 B
transferred above. File at destination is untouched.mc --version
mc version RELEASE.2020-08-20T00-23-01Z
System information
The text was updated successfully, but these errors were encountered: