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:
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?
Thanks @tjprescott! We are using copy start-batch as recommended in https://github.com/Azure/azure-cli/issues/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.
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.
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.
There is no reason to bring back azure storage blob copy show as this information is returned as part of az storage blob show.
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?
@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.
@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.
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'
Consider adding a note to the az storage blob copy documentation about where to check the status of the copy operation.
Most helpful comment
Thanks @tjprescott! We are using
copy start-batchas recommended in https://github.com/Azure/azure-cli/issues/1527.Just tested the following and it worked great!
Perhaps a note in the help output or an alias under
az storage blob copywould be useful. Particularly because that is where thecopy_idis given, and where thecanceloperation lives.You can close this issue. Thanks again.