Fix 2.4.2 upgrade notes formatting refs #19330
[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 Workbench or the @arv-put@ command line tool.
13
14 # "*Upload using Workbench*":#upload-using-workbench
15 # "*Creating projects*":#creating-projects
16 # "*Upload using command line tool*":#upload-using-command
17
18 h2(#upload-using-workbench). Upload using Workbench
19
20 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.
21
22 To upload files into a new collection, click on *Add data*<span class="caret"></span> dropdown menu and select *Upload files from my computer*.
23
24 !{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/upload-using-workbench.png!
25
26 <br/>This will create a new empty collection in your chosen project and will take you to the *Upload* tab for that collection.
27
28 !{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/upload-tab-in-new-collection.png!
29
30 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.
31
32 !{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/files-uploaded.png!
33
34 *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.
35
36 *Note:* You can also use the Upload tab to add additional files to an existing collection.
37
38 notextile. <div class="spaced-out">
39
40 h2(#creating-projects). Creating projects
41
42 Files are organized into Collections, and Collections are organized by Projects.
43
44 Click on *Projects*<span class="caret"></span> <span class="rarr">&rarr;</span> <i class="fa fa-fw fa-plus"></i>*Add a new project* to add a top level project.
45
46 To create a subproject, navigate to the parent project, and click on <i class="fa fa-fw fa-plus"></i>*Add a subproject*.
47
48 See "Sharing collections":tutorial-keep-get.html#download-shared-collection for information about sharing projects and collections with other users.
49
50 h2(#upload-using-command). Upload using command line tool
51
52 {% include 'tutorial_expectations' %}
53
54 To upload a file to Keep using @arv-put@:
55 <notextile>
56 <pre><code>~$ <span class="userinput">arv-put var-GS000016015-ASM.tsv.bz2</span>
57 216M / 216M 100.0%
58 Collection saved as ...
59 zzzzz-4zz18-xxxxxxxxxxxxxxx
60 </code></pre>
61 </notextile>
62
63
64 The output value @zzzzz-4zz18-xxxxxxxxxxxxxxx@ is the uuid of the Arvados collection created.
65
66 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
67
68 <notextile><a name="dir"></a></notextile>It is also possible to upload an entire directory with @arv-put@:
69
70 <notextile>
71 <pre><code>~$ <span class="userinput">mkdir tmp</span>
72 ~$ <span class="userinput">echo "hello alice" > tmp/alice.txt</span>
73 ~$ <span class="userinput">echo "hello bob" > tmp/bob.txt</span>
74 ~$ <span class="userinput">echo "hello carol" > tmp/carol.txt</span>
75 ~$ <span class="userinput">arv-put tmp</span>
76 0M / 0M 100.0%
77 Collection saved as ...
78 zzzzz-4zz18-yyyyyyyyyyyyyyy
79 </code></pre>
80 </notextile>
81
82 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.
83
84 @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.
85
86 h3. Locate your collection in Workbench
87
88 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.
89
90 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.
91
92 !{display: block;margin-left: 25px;margin-right: auto;}{{ site.baseurl }}/images/workbench-move-selected.png!
93
94 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.
95
96 notextile. </div>