Make sure examples work, lots of wordsmithing and reorganizing for clarity.
[arvados.git] / doc / user / tutorials / tutorial-keep-get.html.textile.liquid
1 ---
2 layout: default
3 navsection: userguide
4 title: "Downloading 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 downloaded using either the arv commands or using Workbench.
13
14 # "*Download using Workbench*":#download-using-workbench
15 # "*Sharing collections*":#download-shared-collection
16 # "*Download using command line tools*":#download-using-arv
17
18 h2(#download-using-workbench). Download using Workbench
19
20 You can also download Arvados data collections using the Workbench.
21
22 Visit the Workbench *Dashboard*. Click on *Projects*<span class="caret"></span> dropdown menu in the top navigation menu, select your *Home* project. You will see the *Data collections* tab, which lists the collections in this project.
23
24 You can access the contents of a collection by clicking on the *<i class="fa fa-fw fa-archive"></i> Show* button next to the collection. This will take you to the collection's page. Using this page you can see the collection's contents, and download individual files.
25
26 You can now download the collection files by clicking on the <span class="btn btn-sm btn-info"><i class="fa fa-download"></i></span> button(s).
27
28 h2(#download-shared-collection). Sharing collections
29
30 h3. Sharing with other Arvados users
31
32 Collections can be shared with other users on the Arvados cluster by sharing the parent project.  Navigate to the parent project using the "breadcrumbs" bar, then click on the *Sharing* tab.  From the sharing tab, you can choose which users or groups to share with, and their level of access.
33
34 h3. Creating a special download URL
35
36 To share a collection with users that do not have an account on your Arvados cluster, visit the collection page using Workbench as described in the above section. Once on this page, click on the <span class="btn btn-sm btn-primary" >Create sharing link</span> button.
37
38 This will create a sharing link for the collection as shown below. You can copy the sharing link in this page and share it with other users.
39
40 !{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/shared-collection.png!
41
42 A user with this url can download this collection by simply accessing this url using browser. It will present a downloadable version of the collection as shown below.
43
44 !{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/download-shared-collection.png!
45
46 h2(#download-using-arv). Download using command line tools
47
48 {% include 'tutorial_expectations' %}
49
50 You can download Arvados data collections using the command line tools @arv-ls@ and @arv-get@.
51
52 Use @arv-ls@ to view the contents of a collection:
53
54 <notextile>
55 <pre><code>~$ <span class="userinput">arv-ls ae480c5099b81e17267b7445e35b4bc7+180</span>
56 ./HWI-ST1027_129_D0THKACXX.1_1.fastq
57 ./HWI-ST1027_129_D0THKACXX.1_2.fastq
58 </code></pre>
59
60 Use @-s@ to print file sizes, in kilobytes, rounded up:
61
62 <notextile>
63 <pre><code>~$ <span class="userinput">arv-ls -s ae480c5099b81e17267b7445e35b4bc7+180</span>
64      12258 ./HWI-ST1027_129_D0THKACXX.1_1.fastq
65      12258 ./HWI-ST1027_129_D0THKACXX.1_2.fastq
66 </code></pre>
67 </notextile>
68
69 Use @arv-get@ to download the contents of a collection and place it in the directory specified in the second argument (in this example, @.@ for the current directory):
70
71 <notextile>
72 <pre><code>~$ <span class="userinput">$ arv-get ae480c5099b81e17267b7445e35b4bc7+180/ .</span>
73 23 MiB / 23 MiB 100.0%
74 ~$ <span class="userinput">ls</span>
75 HWI-ST1027_129_D0THKACXX.1_1.fastq  HWI-ST1027_129_D0THKACXX.1_2.fastq
76 </code></pre>
77 </notextile>
78
79 You can also download individual files:
80
81 <notextile>
82 <pre><code>~$ <span class="userinput">arv-get ae480c5099b81e17267b7445e35b4bc7+180/HWI-ST1027_129_D0THKACXX.1_1.fastq .</span>
83 11 MiB / 11 MiB 100.0%
84 </code></pre>
85 </notextile>
86
87 h3. Federated downloads
88
89 If your cluster is "configured to be part of a federation":{{site.baseurl}}/admin/federation.html you can also download collections hosted on other clusters (with appropriate permissions).
90
91 If you request a collection by portable data hash, it will first search the home cluster, then search federated clusters.
92
93 You may also request a collection by UUID.  In this case, it will contact the cluster named in the UUID prefix (in this example, @zzzzz@).
94
95 <notextile>
96 <pre><code>~$ <span class="userinput">arv-get zzzzz-4zz18-fw6dnjxtkvzdewt/ .</span>
97 </code></pre>
98 </notextile>