1.1. Search for storage accounts, click +Create, Create a new storage account
-Create a resource group: idaho
Storage account name: idahosa (or any available name)
Location: Central US
Performance: Standard
1.2. Go back to the storage account "idahosa". Click on Containers, Click on + Container to create a container, Enter in the name: 'kivasidaho' and other information if necessary
1.3. On the top right corner, click on Cloud Shell - Bash. top right corner, click on Cloud Shell - Bash. Mount storage account to cloud shell and set it so it automatically creates a storage account for you
1.4. Go back to storage account, go to the storage account that Cloud Shell created for you, e.g. "cs210032003e4bf9432", Click on File Shares, Click on Upload, Upload "pexels-cottonbro-3944417.jpg" (or a file you have available)
1.6. Download Linux x86-64. Rename to azcopy.tar.gz to make it easier to work with. Upload the file onto the File Shares on the second storage account.
1.7. Go back to Cloud Shell, type in ls, press enter, type in cd clouddrive to change directory, press enter. This is where your files are: azcopy.tar.gz and (the jpg, png, or whichever file you uploaded)
Section 2 - Untar the tar file
2.1. To untar the tar file(Unzip), type in tar -xvzf azcopy.tar.gz, press ls, a new folder has been created
2.2. Enter in cd az, press Tab to complete the azcopy_linux_amd64_10.27.0/ | Note: your version may be different due to updates
2.3. Enter in mv azcopy ../ to move azcopy back on directory, Enter in cd .. to move back one directory, Enter in ls, Enter in clear
2.4. Enter in rm -r azcopy_linux_amd64_10.27.0/ to remove the folder
2.5. Enter in rm -r azcopy.tar.gz to remove the folder, Enter in clear, Enter in ls -la
you should have two files in ~/clouddrive: azcopy and pexel-cottonbro-3944417.jpg
4.1. Delete the file "pexels-cottonbro-3944417.jpg" on the kivasfajo container, since you already have it
4.2. Go back to storage account "idaho", go to the kivasidaho container, type in SAS (shared access signature) on the search tab of storage account
4.3. For Permissions - Select all options, Press Generate SAS Token and URL, copy the SAS Token
4.4. Back to Cloud Shell, type in azcopy cp pexels-cottonbro-3944417.jpg "sp=r&st=2024-11-04T20:07:53Z&se=2024-11-05T04:07:53Z&sv=2022-11-02&sr=c&sig=IiidZRXRX8tv5nKVjufzN6JyQuCPo9kzH1RxmBk8vNw%3D
Reference Get started with AzCopy
Copy blobs between Azure storage accounts by using AzCopy
Section 1 - Create storage account, download Linux, and upload files
1.1. Search for storage accounts, click +Create, Create a new storage account -Create a resource group: idaho Storage account name: idahosa (or any available name) Location: Central US Performance: Standard
1.2. Go back to the storage account "idahosa". Click on Containers, Click on + Container to create a container, Enter in the name: 'kivasidaho' and other information if necessary
1.3. On the top right corner, click on Cloud Shell - Bash. top right corner, click on Cloud Shell - Bash. Mount storage account to cloud shell and set it so it automatically creates a storage account for you
1.4. Go back to storage account, go to the storage account that Cloud Shell created for you, e.g. "cs210032003e4bf9432", Click on File Shares, Click on Upload, Upload "pexels-cottonbro-3944417.jpg" (or a file you have available)
1.5. Go to https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10
1.6. Download Linux x86-64. Rename to azcopy.tar.gz to make it easier to work with. Upload the file onto the File Shares on the second storage account.
1.7. Go back to Cloud Shell, type in ls, press enter, type in cd clouddrive to change directory, press enter. This is where your files are: azcopy.tar.gz and (the jpg, png, or whichever file you uploaded)
Section 2 - Untar the tar file
2.1. To untar the tar file(Unzip), type in tar -xvzf azcopy.tar.gz, press ls, a new folder has been created
2.2. Enter in cd az, press Tab to complete the azcopy_linux_amd64_10.27.0/ | Note: your version may be different due to updates
2.3. Enter in mv azcopy ../ to move azcopy back on directory, Enter in cd .. to move back one directory, Enter in ls, Enter in clear
2.4. Enter in rm -r azcopy_linux_amd64_10.27.0/ to remove the folder
2.5. Enter in rm -r azcopy.tar.gz to remove the folder, Enter in clear, Enter in ls -la
you should have two files in ~/clouddrive: azcopy and pexel-cottonbro-3944417.jpg
Section 3 - azcopy with Active Directory
3.1. On Cloud Shell, Enter in azcopy login
3.2. Copy the link https://microsoft.com/devicelogin and enter the code to authenticate, ensure you are logged in successfully.
3.3. Enter in 'azcopy copy pexels-cottonbro-3944417.jpg https://idahosa.blob.core.windows.net/kivasidaho/pexels-cottonbro-3944417.jpg'
3.4. Go to Storage accounts of "idaho", click on Access Control (IAM), Click on +Add, Assign yourself to "Storage Blob Data Owner"
3.5. Go to containers "kivasidaho", click on properties, you can find and copy the "URL" so it's easier to type in
3.6. Back to Cloud Shell, type in 'azcopy copy pexels-cottonbro-3944417.jpg https://idahosa.blob.core.windows.net/kivasidaho/pexels-cottonbro-3944417.jpg'
Section 4 - azcopy with SAS
4.1. Delete the file "pexels-cottonbro-3944417.jpg" on the kivasfajo container, since you already have it
4.2. Go back to storage account "idaho", go to the kivasidaho container, type in SAS (shared access signature) on the search tab of storage account
4.3. For Permissions - Select all options, Press Generate SAS Token and URL, copy the SAS Token
4.4. Back to Cloud Shell, type in azcopy cp pexels-cottonbro-3944417.jpg "sp=r&st=2024-11-04T20:07:53Z&se=2024-11-05T04:07:53Z&sv=2022-11-02&sr=c&sig=IiidZRXRX8tv5nKVjufzN6JyQuCPo9kzH1RxmBk8vNw%3D
4.5.