index.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <link rel="canonical" href="https://OLC-LOC-Bioinformatics.github.io/AzureStorage/upload/">
  9. <link rel="shortcut icon" href="../img/favicon.ico">
  10. <title>Upload - OLC Bioinformatics Azure Storage</title>
  11. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700" />
  12. <link rel="stylesheet" href="../css/theme.css" />
  13. <link rel="stylesheet" href="../css/theme_extra.css" />
  14. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" />
  15. <script>
  16. // Current page data
  17. var mkdocs_page_name = "Upload";
  18. var mkdocs_page_input_path = "upload.md";
  19. var mkdocs_page_url = "/AzureStorage/upload/";
  20. </script>
  21. <script src="../js/jquery-2.1.1.min.js" defer></script>
  22. <script src="../js/modernizr-2.8.3.min.js" defer></script>
  23. <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
  24. <script>hljs.initHighlightingOnLoad();</script>
  25. </head>
  26. <body class="wy-body-for-nav" role="document">
  27. <div class="wy-grid-for-nav">
  28. <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
  29. <div class="wy-side-scroll">
  30. <div class="wy-side-nav-search">
  31. <a href=".." class="icon icon-home"> OLC Bioinformatics Azure Storage</a>
  32. <div role="search">
  33. <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
  34. <input type="text" name="q" placeholder="Search docs" title="Type search term here" />
  35. </form>
  36. </div>
  37. </div>
  38. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  39. <ul>
  40. <li class="toctree-l1"><a class="reference internal" href="..">Home</a>
  41. </li>
  42. </ul>
  43. <ul>
  44. <li class="toctree-l1"><a class="reference internal" href="../install/">Installation</a>
  45. </li>
  46. </ul>
  47. <ul>
  48. <li class="toctree-l1"><a class="reference internal" href="../credentials/">Credentials</a>
  49. </li>
  50. </ul>
  51. <ul class="current">
  52. <li class="toctree-l1 current"><a class="reference internal current" href="./">Upload</a>
  53. <ul class="current">
  54. <li class="toctree-l2"><a class="reference internal" href="#general-usage">General Usage</a>
  55. </li>
  56. <li class="toctree-l2"><a class="reference internal" href="#azureupload-file">AzureUpload file</a>
  57. <ul>
  58. <li class="toctree-l3"><a class="reference internal" href="#required-arguments">Required arguments:</a>
  59. </li>
  60. <li class="toctree-l3"><a class="reference internal" href="#optional-arguments">Optional arguments:</a>
  61. </li>
  62. <li class="toctree-l3"><a class="reference internal" href="#example-commands">Example commands:</a>
  63. </li>
  64. <li class="toctree-l3"><a class="reference internal" href="#usage">Usage</a>
  65. </li>
  66. </ul>
  67. </li>
  68. <li class="toctree-l2"><a class="reference internal" href="#azureupload-folder">AzureUpload folder</a>
  69. <ul>
  70. <li class="toctree-l3"><a class="reference internal" href="#required-arguments_1">Required arguments:</a>
  71. </li>
  72. <li class="toctree-l3"><a class="reference internal" href="#optional-arguments_1">Optional arguments:</a>
  73. </li>
  74. <li class="toctree-l3"><a class="reference internal" href="#example-commands_1">Example commands:</a>
  75. </li>
  76. <li class="toctree-l3"><a class="reference internal" href="#usage_1">Usage</a>
  77. </li>
  78. </ul>
  79. </li>
  80. </ul>
  81. </li>
  82. </ul>
  83. <ul>
  84. <li class="toctree-l1"><a class="reference internal" href="../sas_url/">SAS URL</a>
  85. </li>
  86. </ul>
  87. <ul>
  88. <li class="toctree-l1"><a class="reference internal" href="../move/">Move</a>
  89. </li>
  90. </ul>
  91. <ul>
  92. <li class="toctree-l1"><a class="reference internal" href="../download/">Download</a>
  93. </li>
  94. </ul>
  95. <ul>
  96. <li class="toctree-l1"><a class="reference internal" href="../set_tier/">Set Tier</a>
  97. </li>
  98. </ul>
  99. <ul>
  100. <li class="toctree-l1"><a class="reference internal" href="../delete/">Delete</a>
  101. </li>
  102. </ul>
  103. <ul>
  104. <li class="toctree-l1"><a class="reference internal" href="../automate/">Automate</a>
  105. </li>
  106. </ul>
  107. <ul>
  108. <li class="toctree-l1"><a class="reference internal" href="../list/">List</a>
  109. </li>
  110. </ul>
  111. </div>
  112. </div>
  113. </nav>
  114. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  115. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  116. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  117. <a href="..">OLC Bioinformatics Azure Storage</a>
  118. </nav>
  119. <div class="wy-nav-content">
  120. <div class="rst-content">
  121. <div role="navigation" aria-label="breadcrumbs navigation">
  122. <ul class="wy-breadcrumbs">
  123. <li><a href="..">Docs</a> &raquo;</li>
  124. <li>Upload</li>
  125. <li class="wy-breadcrumbs-aside">
  126. <a href="https://github.com/OLC-LOC-Bioinformatics/AzureStorage/edit/main/docs/upload.md"
  127. class="icon icon-github"> Edit on GitHub</a>
  128. </li>
  129. </ul>
  130. <hr/>
  131. </div>
  132. <div role="main">
  133. <div class="section">
  134. <h2 id="azureupload">AzureUpload</h2>
  135. <p>AzureUpload allows you to upload a file or a folder to your Azure storage account.</p>
  136. <p>Choose either the <a href="#azureupload-file"><code>file</code></a> or <a href="#azureupload-folder"><code>folder</code></a> functionality</p>
  137. <h4 id="general-usage">General Usage</h4>
  138. <pre><code>usage: AzureUpload [-h] {file,folder} ...
  139. Upload files or folders to Azure storage
  140. optional arguments:
  141. -h, --help show this help message and exit
  142. Available functionality:
  143. {file,folder}
  144. file Upload a file to Azure storage
  145. folder Upload a folder to Azure storage
  146. </code></pre>
  147. <h3 id="azureupload-file">AzureUpload file</h3>
  148. <p>Upload a single file to your Azure storage account. </p>
  149. <h4 id="required-arguments">Required arguments:</h4>
  150. <ul>
  151. <li>container name</li>
  152. <li>account name</li>
  153. <li>name and path of file to upload</li>
  154. </ul>
  155. <h4 id="optional-arguments">Optional arguments:</h4>
  156. <ul>
  157. <li>passphrase used to store your connection string in the system keyring (default is AzureStorage)</li>
  158. <li>verbosity: set the logging level. Options are debug,info,warning,error,critical. Default is info</li>
  159. <li>path to store the file: change the folder structure of the file in Azure storage compared to your local system</li>
  160. <li>storage tier: set the storage tier of the file in Azure storage. Options are Hot, Cool, Archive. Default is Hot</li>
  161. </ul>
  162. <h4 id="example-commands">Example commands:</h4>
  163. <p>These commands will use <code>container-name</code> as the name of the container, and <code>account_name</code> as the name of the storage account</p>
  164. <p>To upload the file <code>file_name.gz</code> in your current working directory:</p>
  165. <p><code>AzureUpload file -a account_name -c container-name -f file_name.gz</code></p>
  166. <p>To upload the file <code>file_name.gz</code> in your current working directory and set the storage tier to <code>Cool</code>:</p>
  167. <p><code>AzureUpload file -a account_name -c container-name -f file_name.gz -s Cool</code></p>
  168. <p>To upload the file <code>file_name.gz</code> nested in the folder <code>outputs</code> in your current working directory:</p>
  169. <p><code>AzureUpload file -a account_name -c container-name -f outputs/file_name.gz</code></p>
  170. <p>To upload the file <code>file_name.gz</code> nested in the folder <code>outputs</code> in your current working directory to the root of the container:</p>
  171. <p><code>AzureUpload file -a account_name -c container-name -f outputs/file_name.gz -r ""</code></p>
  172. <p>To upload the file <code>file_name.gz</code> nested in the folder <code>outputs</code> in your current working directory to the folder <code>results/parsing</code> in the container:</p>
  173. <p><code>AzureUpload file -a account_name -c container-name -f outputs/file_name.gz -r results/parsing</code></p>
  174. <p>To upload the file <code>/home/users/account/files/file_name.gz</code> to path <code>data</code>:</p>
  175. <p><code>AzureUpload file -a account_name -c container-name -f /home/users/account/files/file_name.gz -r data</code></p>
  176. <p>To upload that same file to the root of the container:</p>
  177. <p><code>AzureUpload file -a account_name -c container-name -f /home/users/account/files/file_name.gz -r ""</code></p>
  178. <p>To retain the path of the file:</p>
  179. <p><code>AzureUpload file -a account_name -c container-name -f /home/users/account/files/file_name.gz</code></p>
  180. <h4 id="usage">Usage</h4>
  181. <pre><code>usage: AzureUpload file [-h] -c CONTAINER_NAME -a ACCOUNT_NAME [-p PASSPHRASE]
  182. [-v {debug,info,warning,error,critical}] [-r RESET_PATH]
  183. [-s {Hot,Cool,Archive}] -f FILE
  184. Upload a file to Azure storage
  185. optional arguments:
  186. -h, --help show this help message and exit
  187. -c CONTAINER_NAME, --container_name CONTAINER_NAME
  188. Name of the Azure storage container. Note that container names must be lowercase, between 3 and 63 characters, start with a letter or number, and can contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted.
  189. -a ACCOUNT_NAME, --account_name ACCOUNT_NAME
  190. Name of the Azure storage account
  191. -p PASSPHRASE, --passphrase PASSPHRASE
  192. The passphrase to use when encrypting the azure storage-specific connection string to the system keyring. Default is &quot;AzureStorage&quot;.
  193. -v {debug,info,warning,error,critical}, --verbosity {debug,info,warning,error,critical}
  194. Set the logging level. Default is info.
  195. -r RESET_PATH, --reset_path RESET_PATH
  196. Set the path of the file/folder within a folder in the target container e.g. sequence_data/220202-m05722. If you want to place it directly in the container without any nesting, use &quot;&quot; or ''
  197. -s {Hot,Cool,Archive}, --storage_tier {Hot,Cool,Archive}
  198. Set the storage tier for the file/folder to be uploaded. Options are &quot;Hot&quot;, &quot;Cool&quot;, and &quot;Archive&quot;. Default is Hot
  199. -f FILE, --file FILE Name and path of the file to upload to Azure storage.e.g. /mnt/sequences/220202_M05722/2022-SEQ-0001_S1_L001_R1_001.fastq.gz
  200. </code></pre>
  201. <h3 id="azureupload-folder">AzureUpload folder</h3>
  202. <p>Upload a single folder (and its contents) to your Azure storage account. Note that having a trailing slash ('/') at the end of your folder name will not affect the script</p>
  203. <h4 id="required-arguments_1">Required arguments:</h4>
  204. <ul>
  205. <li>container name</li>
  206. <li>account name</li>
  207. <li>name and path of folder to upload</li>
  208. </ul>
  209. <h4 id="optional-arguments_1">Optional arguments:</h4>
  210. <ul>
  211. <li>passphrase used to store your connection string in the system keyring (default is AzureStorage)</li>
  212. <li>verbosity: set the logging level. Options are debug,info,warning,error,critical. Default is info</li>
  213. <li>path to store the file: change the folder structure of the file in Azure storage compared to your local system</li>
  214. <li>storage tier: set the storage tier of the file in Azure storage. Options are Hot, Cool, Archive. Default is Hot</li>
  215. </ul>
  216. <h4 id="example-commands_1">Example commands:</h4>
  217. <p>These commands will use <code>container-name</code> as the name of the container, and <code>account_name</code> as the name of the storage account</p>
  218. <p>To upload the folder <code>folder_name</code> in your current working directory:</p>
  219. <p><code>AzureUpload folder -a account_name -c container-name -f folder_name</code></p>
  220. <p>To upload the folder <code>folder_name</code> in your current working directory and set the storage tier to <code>Cool</code>:</p>
  221. <p><code>AzureUpload folder -a account_name -c container-name -f folder_name -s Cool</code></p>
  222. <p>To upload the folder <code>folder_name</code> nested in the folder <code>outputs</code> in your current working directory:</p>
  223. <p><code>AzureUpload folder -a account_name -c container-name -f outputs/folder_name</code></p>
  224. <p>To upload the folder <code>folder_name</code> nested in the folder <code>outputs</code> in your current working directory to the root of the container:</p>
  225. <p><code>AzureUpload folder -a account_name -c container-name -f outputs/file_name.gz -r ""</code></p>
  226. <p>To upload the folder <code>folder_name</code> nested in the folder <code>outputs</code> in your current working directory to the folder <code>results/parsing</code> in the container:</p>
  227. <p><code>AzureUpload folder -a account_name -c container-name -f outputs/folder_namw -r results/parsing</code></p>
  228. <p>To upload the folder <code>/home/users/account/files/</code> to path <code>data</code>:</p>
  229. <p><code>AzureUpload folder -a account_name -c container-name -f /home/users/account/files/ -r data</code></p>
  230. <p>To upload that same folder to the root of the container:</p>
  231. <p><code>AzureUpload folder -a account_name -c container-name -f /home/users/account/files -r ""</code></p>
  232. <p>To retain the path of the folder:</p>
  233. <p><code>AzureUpload folder -a account_name -c container-name -f /home/users/account/files/</code></p>
  234. <h4 id="usage_1">Usage</h4>
  235. <pre><code>usage: AzureUpload folder [-h] -c CONTAINER_NAME -a ACCOUNT_NAME [-p PASSPHRASE]
  236. [-v {debug,info,warning,error,critical}] [-r RESET_PATH]
  237. [-s {Hot,Cool,Archive}] -f FOLDER
  238. Upload a folder to Azure storage
  239. optional arguments:
  240. -h, --help show this help message and exit
  241. -c CONTAINER_NAME, --container_name CONTAINER_NAME
  242. Name of the Azure storage container. Note that container names must be lowercase, between 3 and 63 characters, start with a letter or number, and can contain only letters, numbers, and the dash (-) character. Consecutive dashes are not permitted.
  243. -a ACCOUNT_NAME, --account_name ACCOUNT_NAME
  244. Name of the Azure storage account
  245. -p PASSPHRASE, --passphrase PASSPHRASE
  246. The passphrase to use when encrypting the azure storage-specific connection string to the system keyring. Default is &quot;AzureStorage&quot;.
  247. -v {debug,info,warning,error,critical}, --verbosity {debug,info,warning,error,critical}
  248. Set the logging level. Default is info.
  249. -r RESET_PATH, --reset_path RESET_PATH
  250. Set the path of the file/folder within a folder in the target container e.g. sequence_data/220202-m05722. If you want to place it directly in the container without any nesting, use &quot;&quot; or ''
  251. -s {Hot,Cool,Archive}, --storage_tier {Hot,Cool,Archive}
  252. Set the storage tier for the file/folder to be uploaded. Options are &quot;Hot&quot;, &quot;Cool&quot;, and &quot;Archive&quot;. Default is Hot
  253. -f FOLDER, --folder FOLDER
  254. Name and path of the folder to upload to Azure storage.e.g. /mnt/sequences/220202_M05722/
  255. </code></pre>
  256. </div>
  257. </div>
  258. <footer>
  259. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  260. <a href="../sas_url/" class="btn btn-neutral float-right" title="SAS URL">Next <span class="icon icon-circle-arrow-right"></span></a>
  261. <a href="../credentials/" class="btn btn-neutral" title="Credentials"><span class="icon icon-circle-arrow-left"></span> Previous</a>
  262. </div>
  263. <hr/>
  264. <div role="contentinfo">
  265. <!-- Copyright etc -->
  266. </div>
  267. Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
  268. </footer>
  269. </div>
  270. </div>
  271. </section>
  272. </div>
  273. <div class="rst-versions" role="note" aria-label="versions">
  274. <span class="rst-current-version" data-toggle="rst-current-version">
  275. <a href="https://github.com/OLC-LOC-Bioinformatics/AzureStorage/" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
  276. <span><a href="../credentials/" style="color: #fcfcfc;">&laquo; Previous</a></span>
  277. <span style="margin-left: 15px"><a href="../sas_url/" style="color: #fcfcfc">Next &raquo;</a></span>
  278. </span>
  279. </div>
  280. <script>var base_url = '..';</script>
  281. <script src="../js/theme.js" defer></script>
  282. <script src="../search/main.js" defer></script>
  283. <script defer>
  284. window.onload = function () {
  285. SphinxRtdTheme.Navigation.enable(true);
  286. };
  287. </script>
  288. </body>
  289. </html>