bonjour hi welcome in this episode of cloud in five minutes
today i want to show you how it's possible to move data in the cloud without having to download
it first and then re-upload it so directly from the cloud to the cloud let's get started
there's multiple ways you could copy data in azure but today i want to focus
on one it's a z copy it's a tool it's available
it can run on any platform and if you go at aka dot ms slash azcopy you will have more information
and the reason why i want to focus today on az copy is in fact you don't even need to
download it and install it it's already available to you through the azure portal so if we go in the
azure portal so portal.azure.com and we click here on this little icon that's open the cloud shell
perfect and if we type ac copy dash dash version you will see that easy copy it's already installed
and what we want to do today is copy a zip file from a blob storage to another blob storage and
that's very easy to do with one comment here ac copy and then copy because you could do
many different action and have my url from for my source and another url for my destination i will
do that it will take a few seconds and now i could see i have one file that was already transferred
interested now let's see the details so we'll go back here that was the command i execute
so easy copy that's my name of my application copy because today i want to focus on copy
but go at akms slash easy copy you will have more detail about everything you could do with
that tool and then i have two url the first one is my source and the last one is my destination
i could copy one file multiple file following a certain pattern with wildcard if i want or a full
repository a full folder so here i'm using sas token as a security so the first part of the url
is my blob storage with my file here it's tess zipper.zip and then i have my sas token so how
can we get those addresses and those sas token to do that we need to go back in the azure portal and
we'll show you how to get those and here we are back in the portal just i want to show you here
those two account are the file i'm using for this demo so i'm taking a file myself
file from this storage and copying in the other one so we'll need to create a sas token for each
one of those it doesn't matter if the storage are in the same account or a different account
it will work you just need to go log in into that specific account and create a sas token
just like i will show you right now so let's say i'm clicking on this account so here i'm in my
storage and what i'm going to do now is create that sas token so i could here search for sas
for share access signature or sas token that's an acronym sas means share access signature so i'll
click here and now i have all the information the form to give access i strongly suggest you
give the minimum permission you need so if i know i will be only moving blub i don't need
to have all those three others and now i want to do let's say container and object and maybe
i just need to read it or write it so give the permission you want also pick the date you need
just picking the date let's say i'm having a one day window to run my process and that's perfect
once i have it i could generate here by clicking that blue button at the bottom and now i have it
so i could use my sas token or i could do directly the url with everything included i need to do that
for both the source and the destination and now i could have those url inside my command and that's
how you run it once you have everything you could open the cloud shell or if you prefer you could
also run it locally there is no problem with that and then you will have it and if we go inside my
container in dev we can see that my file is there if you need more info go at aka.mslash azcopy
you have all the information the downloadable will also be there all the information about
all the comments and all the rules you could apply i hope that helps if you have questions
leave them in the comment sections i'm always happy to help you see you in the next one bye