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

[Storage] Retrieving blob copy status #1787

Closed
valencik opened this issue Jan 19, 2017 · 11 comments
Closed

[Storage] Retrieving blob copy status #1787

valencik opened this issue Jan 19, 2017 · 11 comments
Labels
Milestone

Comments

@valencik
Copy link

valencik commented Jan 19, 2017

How can I check the status of a async blob copy?
The az storage blob copy cancel appears to be the only blob command to take a --copy-id as returned from a az storage blob copy start command.
I would like to be able to get some sense of progress on the copy operation.

A nice bonus would be being able to optionally block/wait on the copy operation.


Update by @troydai on 8/29/2017

Requested features:

  1. Wait on blob copy operation. [https://github.com/Add wait/no-wait support to Commands #1528]
  2. Get copy operation status.
@tjprescott
Copy link
Member

Hi @valencik you can check the copy status using the az storage file|blob show command. It will show the copy properties of the last copy operation.

I'm adding your suggestion to wait on the copy operation to issue #1528.

Are you using the copy start command or the copy start-batch command?

@valencik
Copy link
Author

Thanks @tjprescott! We are using copy start-batch as recommended in #1527.

Just tested the following and it worked great!

az storage blob show \
--name Microsoft.Compute/Images/vhds/capture-1234-osDisk.hexcodestuffvhd \
--container-name system \
--account-name myAccountName

Perhaps a note in the help output or an alias under az storage blob copy would be useful. Particularly because that is where the copy_id is given, and where the cancel operation lives.

You can close this issue. Thanks again.

@u6006
Copy link

u6006 commented May 10, 2017

  • copy info's still missing when using table output format (table output format has limited info for most command-lines for now (v2.0.6))
  • hope you can bring the old command-line "azure storage blob copy show" back

@alexeyshishkin01
Copy link

hello, all!
is there any news regarding the status of blob copy?
I use azure-cli (2.0.15) which is still missing this functionality.

@troydai
Copy link
Contributor

troydai commented Aug 29, 2017

I'm reopening this issue and put this on the backlog. It is not a commitment to any of these requested features, but we will review the overall scenarios when we have a chance.

@troydai troydai reopened this Aug 29, 2017
@troydai troydai added this to the Backlog milestone Aug 29, 2017
@tjprescott
Copy link
Member

There is no reason to bring back azure storage blob copy show as this information is returned as part of az storage blob show.

@troydai troydai self-assigned this Aug 29, 2017
@alexeyshishkin01
Copy link

alexeyshishkin01 commented Aug 30, 2017

az storage blob show is only for static info about the blob:

root@Alexey-HP:/root# az storage blob list --container-name centoscontainer --account-name pgproimages
Name                                        Blob Type    Blob Tier         Length  Content Type              Last Modified
------------------------------------------  -----------  -----------  -----------  ------------------------  -------------------------
pgpro-9.6.3.2-enterprise-centos-7-rev4.vhd  PageBlob                  53688140288  application/octet-stream  2017-08-29T16:21:14+00:00
pgpro-9.6.3.2-enterprise-centos-7-rev5.vhd  PageBlob                  53688140288  application/octet-stream  2017-08-29T23:41:18+00:00
root@Alexey-HP:/root# az storage blob show --container-name centoscontainer --name pgpro-9.6.3.2-enterprise-centos-7-rev4.vhd --account-name pgproimages
Name                                        Blob Type    Blob Tier         Length  Content Type              Last Modified
------------------------------------------  -----------  -----------  -----------  ------------------------  -------------------------
pgpro-9.6.3.2-enterprise-centos-7-rev4.vhd  PageBlob                  53688140288  application/octet-stream  2017-08-29T16:21:14+00:00

to find out the status of copy operation I have to run 'az storage blob show' repeatedly and compare 'Last Modified' column value
is there any other way to know about the status of blob copy?

@troydai
Copy link
Contributor

troydai commented Aug 30, 2017

@alexeyshishkin01 az storage blob show is the right way to get blob copy status. The command uses "Get Blob Properties" rest operation, which is the recommended approach: https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob.

@tjprescott
Copy link
Member

@alexeyshishkin01 if I do a az storage blob show/list with JSON output format, I see that copy status is included as part of the blob's properties. If you want to project this into table or TSV format, you can do so with --query.

@troydai I would not advocate for the revival of Xplat's blob copy show command, though we could consider adding copy status to the default table format.

@alexeyshishkin01
Copy link

ok, thanks, but even JSON output is workaround - one has to get it repeatedly to reach the status 'success'
compare it with progress bar of the command 'az storage blob upload'

@tjprescott tjprescott changed the title az storage blob copy status? [Storage] Retrieving blob copy status Aug 31, 2017
@bear454
Copy link

bear454 commented Aug 31, 2018

Consider adding a note to the az storage blob copy documentation about where to check the status of the copy operation.

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

No branches or pull requests

8 participants