You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mc get local22/test-v-bucket/1.txt --vid ec10bd9b-b8b1-4a28-b9dd-b4ed56890b52 /tmp/dl/versions/1_ec10bd9b-b8b1-4a28-b9dd-b4ed56890b52.txt
passing a version id of an object should retrieve a specific object version
➜ mc get -h
NAME:
mc get - get s3 object to local
USAGE:
mc get [FLAGS] SOURCE TARGET
FLAGS:
......(removed other options to highlight the --vid option)
--version-id value, --vid value get a specific version of an object
--help, -h show help
Actual behaviour
In Latest mc and latest minio server (master branch) version
It always retrieves the latest version of an object
Steps to reproduce the behaviour
➜ mc mb local22/test-v-bucket/
Bucket created successfully `local22/test-v-bucket/`.
➜ mc version enable local22/test-v-bucket
local22/test-v-bucket versioning is enabled
➜ mc ls local22/test-v-bucket/
➜ echo "1"| mc pipe local22/test-v-bucket/1.txt
0 B / ? ┃░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓┃
➜ echo "2"| mc pipe local22/test-v-bucket/1.txt
0 B / ? ┃░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓┃
➜ mc ls local22/test-v-bucket/1.txt --versions
[2024-10-01 18:09:40 IST] 2B STANDARD bfa1b91c-2ff5-4b33-adf2-bdb3c03992d1 v2 PUT 1.txt
[2024-10-01 18:09:36 IST] 2B STANDARD ec10bd9b-b8b1-4a28-b9dd-b4ed56890b52 v1 PUT 1.txt
➜ mc cat local22/test-v-bucket/1.txt # Latest version by default.
2
➜ mc cat local22/test-v-bucket/1.txt --vid bfa1b91c-2ff5-4b33-adf2-bdb3c03992d1
2
➜ mc cat local22/test-v-bucket/1.txt --vid ec10bd9b-b8b1-4a28-b9dd-b4ed56890b52
1
➜ mc get local22/test-v-bucket/1.txt --vid bfa1b91c-2ff5-4b33-adf2-bdb3c03992d1 /tmp/dl/versions/1_bfa1b91c-2ff5-4b33-adf2-bdb3c03992d1.txt
...00/test-v-bucket/1.txt: 2 B / 2 B ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃ 790 B/s 0s
➜ mc get local22/test-v-bucket/1.txt --vid ec10bd9b-b8b1-4a28-b9dd-b4ed56890b52 /tmp/dl/versions/1_ec10bd9b-b8b1-4a28-b9dd-b4ed56890b52.txt
...00/test-v-bucket/1.txt: 2 B / 2 B ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃ 794 B/s 0s
➜ cat /tmp/dl/versions/1_bfa1b91c-2ff5-4b33-adf2-bdb3c03992d1.txt
2
➜ cat /tmp/dl/versions/1_ec10bd9b-b8b1-4a28-b9dd-b4ed56890b52.txt
2 # This should have been 1
mc --version
mc --version
mc version RELEASE.2024-09-16T17-43-14Z (commit-id=11ebe952ea30e426e564f66e78d178465ae7c432)
Runtime: go1.22.6 linux/amd64
Copyright (c) 2015-2024 MinIO, Inc.
License GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
mc cat works as expected
➜ mc cat local22/test-v-bucket/1.txt --vid bfa1b91c-2ff5-4b33-adf2-bdb3c03992d1
2
➜ mc cat local22/test-v-bucket/1.txt --vid ec10bd9b-b8b1-4a28-b9dd-b4ed56890b52
1
System information
The text was updated successfully, but these errors were encountered:
Expected behavior
mc get local22/test-v-bucket/1.txt --vid ec10bd9b-b8b1-4a28-b9dd-b4ed56890b52 /tmp/dl/versions/1_ec10bd9b-b8b1-4a28-b9dd-b4ed56890b52.txt
passing a version id of an object should retrieve a specific object version
Actual behaviour
In Latest mc and latest minio server (master branch) version
It always retrieves the latest version of an object
Steps to reproduce the behaviour
mc --version
mc cat
works as expectedSystem information
The text was updated successfully, but these errors were encountered: