{"id":1682,"date":"2022-12-18T11:26:58","date_gmt":"2022-12-18T11:26:58","guid":{"rendered":"https:\/\/thecloudwiki.com\/?p=1682"},"modified":"2022-12-18T11:26:59","modified_gmt":"2022-12-18T11:26:59","slug":"upload-files-to-azure-storage-account-securely-from-ubuntu","status":"publish","type":"post","link":"https:\/\/thecloudwiki.com\/?p=1682","title":{"rendered":"Upload files to Azure storage account securely from Ubuntu"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Pre-requisites:<\/strong><br><br>1 &#8211; Azcopy <br>2 &#8211; Storage account path<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><span style=\"text-decoration: underline\" class=\"underline\">Step: 1<\/span><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#Download azcopy to the ubuntu vm\n\nwget \"https:\/\/aka.ms\/downloadazcopy-v10-linux\" -O azcopy.tar.gz\n\n#Example\n\nroot@LINUX01:~# wget \"https:\/\/aka.ms\/downloadazcopy-v10-linux\" -O azcopy.tar.gz\n--2022-12-18 11:04:01--  https:\/\/aka.ms\/downloadazcopy-v10-linux\nResolving aka.ms (aka.ms)... 23.52.149.185\nConnecting to aka.ms (aka.ms)|23.52.149.185|:443... connected.\nHTTP request sent, awaiting response... 301 Moved Permanently\nLocation: https:\/\/azcopyvnext.azureedge.net\/release20221108\/azcopy_linux_amd64_10.16.2.tar.gz [following]\n--2022-12-18 11:04:01--  https:\/\/azcopyvnext.azureedge.net\/release20221108\/azcopy_linux_amd64_10.16.2.tar.gz\nResolving azcopyvnext.azureedge.net (azcopyvnext.azureedge.net)... 23.213.34.191, 23.213.34.169, 2600:1409:9800:21::17d8:93cb, ...\nConnecting to azcopyvnext.azureedge.net (azcopyvnext.azureedge.net)|23.213.34.191|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 12599077 (12M) [application\/gzip]\nSaving to: \u2018azcopy.tar.gz\u2019\n\nazcopy.tar.gz                                                       100%[===================================================================================================================================================================>]  12.01M  --.-KB\/s    in 0.06s\n\n2022-12-18 11:04:01 (199 MB\/s) - \u2018azcopy.tar.gz\u2019 saved [12599077\/12599077]\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><br><strong><span style=\"text-decoration: underline\" class=\"underline\">Step: 2<\/span><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#Untar the file\n\ntar -zxvf azcopy.tar.gz\n\n# Example output : \n\nroot@LINUX01:~# tar -zxvf azcopy.tar.gz\nazcopy_linux_amd64_10.16.2\/\nazcopy_linux_amd64_10.16.2\/NOTICE.txt\nazcopy_linux_amd64_10.16.2\/azcopy<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><span style=\"text-decoration: underline\" class=\"underline\">Step: 3<\/span><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create a container in a  azure storage account where you would like to copy the files and copy the <strong><em>Blob SAS URL <\/em><\/strong><br>Note : in then permissions section select required permissions to copy , delete files based on the requiremnet <\/p>\n\n\n\n<div class=\"wp-block-coblocks-gallery-stacked\"><ul class=\"coblocks-gallery has-no-alignment has-fullwidth-images has-custom-gutter\" style=\"--coblocks-custom-gutter:0em\"><li class=\"coblocks-gallery--item\"><figure class=\"coblocks-gallery--figure\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"486\" alt=\"\" class=\"wp-image-1683 has-shadow-none\" data-id=\"1683\" data-imglink=\"\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy01-1024x486.png\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy01-1024x486.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy01-300x142.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy01-768x365.png 768w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy01-1536x729.png 1536w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy01.png 1900w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li class=\"coblocks-gallery--item\"><figure class=\"coblocks-gallery--figure\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"758\" alt=\"\" class=\"wp-image-1685 has-shadow-none\" data-id=\"1685\" data-imglink=\"\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy02-1024x758.png\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy02-1024x758.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy02-300x222.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy02-768x569.png 768w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy02.png 1103w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li class=\"coblocks-gallery--item\"><figure class=\"coblocks-gallery--figure\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"107\" alt=\"\" class=\"wp-image-1684 has-shadow-none\" data-id=\"1684\" data-imglink=\"\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy03-1024x107.png\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy03-1024x107.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy03-300x31.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy03-768x80.png 768w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy03-1536x161.png 1536w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2022\/12\/azcopy03.png 1854w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><\/ul><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><span style=\"text-decoration: underline\" class=\"underline\">Step: 4<\/span><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#From the linux machine copy the files\n\n.\/azcopy copy \"\/etc\/sharedfiles\/tehcloudwiki\/abcd.txt\" \"https:\/\/thewikisharedfiles.blob.core.windows.net\/sharedfiles?sp=racwl&amp;st=2022-12-18T10:56:29Z&amp;se=2022-12-18T18:56:29Z&amp;sv=2021-06-08&amp;sr=c&amp;sig=CxxxxXXXXxxxxXXXXDSwq38qc2QroxxXX%3D\"<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Pre-requisites: 1 &#8211; Azcopy 2 &#8211; Storage account path Step: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[22],"tags":[14],"class_list":["post-1682","post","type-post","status-publish","format-standard","hentry","category-azure","tag-azure"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Sandeep","author_link":"https:\/\/thecloudwiki.com\/?author=1"},"uagb_comment_info":0,"uagb_excerpt":"Pre-requisites: 1 &#8211; Azcopy 2 &#8211; Storage account path Step: [&hellip;]","_links":{"self":[{"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/posts\/1682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1682"}],"version-history":[{"count":1,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/posts\/1682\/revisions"}],"predecessor-version":[{"id":1686,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/posts\/1682\/revisions\/1686"}],"wp:attachment":[{"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}