Skip to content
New issue

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

azcopy list --properties "versionid" does not return versions and versionids #2007

Closed
Peejay62 opened this issue Jan 3, 2023 · 7 comments · Fixed by #2550
Closed

azcopy list --properties "versionid" does not return versions and versionids #2007

Peejay62 opened this issue Jan 3, 2023 · 7 comments · Fixed by #2550

Comments

@Peejay62
Copy link

Peejay62 commented Jan 3, 2023

Which version of the AzCopy was used?

Note: The version is visible when running AzCopy without any argument

V10.16.2

Which platform are you using? (ex: Windows, Mac, Linux)

Windows server 2016

What command did you run?

Note: Please remove the SAS to avoid exposing your credentials. If you cannot remember the exact command, please retrieve it from the beginning of the log file.

azcopy,exe list https://<stgaccount/container> --properties "LastModifiedTime;VersionID"

What problem was encountered?

the above list does only list current versions and also doesn't return a versionid. I would expect that when I had an object A and older versions of object A (A_v1, A_v2, A_v3 and so on) azcopy list would return all versions in the listing.

How can we reproduce the problem in the simplest way?

Make an object with versioning on, write this object multiple times to create versions and the run azcopy list.

Have you found a mitigation/solution?

no

@grillba
Copy link

grillba commented Jan 12, 2023

Why is this labeled a feature request when the functionality is documented as above at https://learn.microsoft.com/en-us/azure/storage/common/storage-ref-azcopy-list?

it doesnt return any version IDs at all - And the LastModifiedTime is set to "0001-01-01 00:00:00 +0000 UTC"

@siminsavani-msft
Copy link
Member

Hi @Peejay62 and @grillba ! Apologies for the confusion here. As an alternative, try using the --list-of-versions flag on azcopy copy command.

@Peejay62
Copy link
Author

I do not want to copy (versions). I merely want to report on the content of the container (say dir of container). Only the active occurrences of blobs are listed, no "older" versions. copy --list-of-versions is not suitable in this case

@siminsavani-msft
Copy link
Member

Hi @Peejay62 and @grillba ! Apologies in taking so long to back to this issue! I am currently working on this issue as seen in the linked PR above and wanted to make sure that the expectations are met.

With this PR, Blob VersionIds are printed out correctly:
INFO: hello/stuff/foo.txt; VersionId: 2023-06-05T18:39:41.0295735Z; Content Length: 3.00 B

If the blob has more versions, then that will also be printed out:
INFO: hello/stuff/foo.txt; VersionId: 2023-06-05T18:39:41.0295735Z; Content Length: 3.00 B
INFO: hello/stuff/foo.txt; VersionId: 2023-06-06T10:50:20.0295735Z; Content Length: 3.00 B

Please let me know if there are any other questions or concerns!

@Peejay62
Copy link
Author

Hi, this is what I expect to see with Azcopy list. So this will be available in the new release of Azcopy?

@siminsavani-msft
Copy link
Member

siminsavani-msft commented Jan 25, 2024

Thanks for your response @Peejay62 ! We intend to make this available in 10.24 (March). The upcoming release is 10.23 (Jan) and will not contain the linked PR for this issue.

@gapra-msft
Copy link
Member

This is released in AzCopy v10.24.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants