Merge branch '16678-login-tokens-lifetime-config'
[arvados.git] / doc / user / tutorials / tutorial-keep.html.textile.liquid
1 ---
2 layout: default
3 navsection: userguide
4 title: "Uploading data"
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 Arvados Data collections can be uploaded using either the @arv-put@ command line tool or using Workbench.
13
14 # "*Upload using command line tool*":#upload-using-command
15 # "*Upload using Workbench*":#upload-using-workbench
16
17 notextile. <div class="spaced-out">
18
19 h2(#upload-using-command). Upload using command line tool
20
21 {% include 'tutorial_expectations' %}
22
23 To upload a file to Keep using @arv-put@:
24 <notextile>
25 <pre><code>~$ <span class="userinput">arv-put var-GS000016015-ASM.tsv.bz2</span>
26 216M / 216M 100.0%
27 Collection saved as ...
28 qr1hi-4zz18-xxxxxxxxxxxxxxx
29 </code></pre>
30 </notextile>
31
32
33 The output value @qr1hi-4zz18-xxxxxxxxxxxxxxx@ is the uuid of the Arvados collection created.
34
35 Note: The file used in this example is a freely available TSV file containing variant annotations from the "Personal Genome Project (PGP)":http://www.pgp-hms.org participant "hu599905":https://my.pgp-hms.org/profile/hu599905), downloadable "here":https://warehouse.pgp-hms.org/warehouse/f815ec01d5d2f11cb12874ab2ed50daa+234+K@ant/var-GS000016015-ASM.tsv.bz2. Alternatively, you can replace @var-GS000016015-ASM.tsv.bz2@ with the name of any file you have locally, or you could get the TSV file by "downloading it from Keep.":{{site.baseurl}}/user/tutorials/tutorial-keep-get.html
36
37 <notextile><a name="dir"></a></notextile>It is also possible to upload an entire directory with @arv-put@:
38
39 <notextile>
40 <pre><code>~$ <span class="userinput">mkdir tmp</span>
41 ~$ <span class="userinput">echo "hello alice" > tmp/alice.txt</span>
42 ~$ <span class="userinput">echo "hello bob" > tmp/bob.txt</span>
43 ~$ <span class="userinput">echo "hello carol" > tmp/carol.txt</span>
44 ~$ <span class="userinput">arv-put tmp</span>
45 0M / 0M 100.0%
46 Collection saved as ...
47 qr1hi-4zz18-yyyyyyyyyyyyyyy
48 </code></pre>
49 </notextile>
50
51 In both examples, the @arv-put@ command created a collection. The first collection contains the single uploaded file. The second collection contains the entire uploaded directory.
52
53 @arv-put@ accepts quite a few optional command line arguments, which are described on the "arv subcommands":{{site.baseurl}}/sdk/cli/subcommands.html#arv-keep-put page.
54
55 h3. Locate your collection in Workbench
56
57 Visit the Workbench *Dashboard*.  Click on *Projects*<span class="caret"></span> dropdown menu in the top navigation menu, select your *Home* project.  Your newly uploaded collection should appear near the top of the *Data collections* tab.  The collection name printed by @arv-put@ will appear under the *name* column.
58
59 To move the collection to a different project, check the box at the left of the collection row.  Pull down the *Selection...*<span class="caret"></span> menu near the top of the page tab, and select *Move selected...* button. This will open a dialog box where you can select a destination project for the collection.  Click a project, then finally the <span class="btn btn-sm btn-primary">Move</span> button.
60
61 !{display: block;margin-left: 25px;margin-right: auto;}{{ site.baseurl }}/images/workbench-move-selected.png!
62
63 Click on the *<i class="fa fa-fw fa-archive"></i> Show* button next to the collection's listing on a project page to go to the Workbench page for your collection.  On this page, you can see the collection's contents, download individual files, and set sharing options.
64
65 notextile. </div>
66
67 h2(#upload-using-workbench). Upload using Workbench
68
69 To upload using Workbench, visit the Workbench *Dashboard*. Click on *Projects*<span class="caret"></span> dropdown menu in the top navigation menu and select your *Home* project or any other project of your choosing.  You will see the *Data collections* tab for this project, which lists the collections in this project.
70
71 To upload files into a new collection, click on *Add data*<span class="caret"></span> dropdown menu and select *Upload files from my computer*.
72
73 !{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/upload-using-workbench.png!
74
75 <br/>This will create a new empty collection in your chosen project and will take you to the *Upload* tab for that collection.
76
77 !{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/upload-tab-in-new-collection.png!
78
79 Click on the *Browse...* button and select the files you would like to upload. Selected files will be added to a list of files to be uploaded. After you are done selecting files to upload, click on the *<i class="fa fa-fw fa-play"></i> Start* button to start upload. This will start uploading files to Arvados and Workbench will show you the progress bar. When upload is completed, you will see an indication to that effect.
80
81 !{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/files-uploaded.png!
82
83 *Note:* If you leave the collection page during the upload, the upload process will be aborted and you will need to upload the files again.
84
85 *Note:* You can also use the Upload tab to add additional files to an existing collection.