Copying azure blob that is being updated -
i'm copying blob , associated snapshots 1 azure storage account another, using start-azurestorageblobcopy:
$status = start-azurestorageblobcopy -srccontainer $container -srcblob $blob -srccontext $srccontext -destcontainer $container -destblob $blob -destcontext $destcontext -force however, when application updates blob, copy operation fails.
$copystate = $status | get-azurestorageblobcopystate $copystate.status -eq "failed" is there way copy blob or 1 of snapshots while blob being updated?
in msdn article, topic of async blob copy discussed in detail. in particular, discusses how copy operation locks onto blob's etag, , if etag changes (e.g. changed blob), copy fails.
to avoid this, article suggests getting lease on blob.
the other thing can copy snapshot new blob, snapshot won't modified.
Comments
Post a Comment