changed arv-copy expectations and moved around words in the html file
[arvados.git] / doc / user / topics / arv-copy.html.textile.liquid
1 ---
2 layout: default
3 navsection: userguide
4 title: "Using Arv-copy"
5 ...
6
7
8 This tutorial describes how to copy Arvados objects from one cluster to another by using @arv-copy@.
9
10 {% include 'tutorial_expectations' %}
11
12 h2. Arv-copy
13
14 @arv-copy@ allows users to copy collections, pipeline templates, and pipeline instances, including all their dependencies from one cluster to another.
15
16 For example, lets copy from "cluster1" to "cluster2". The names "cluster1" and "cluster2" are interchangable with any cluster name.
17
18 In order for the clusters to be able to communicate with each other, you must create custom configuration files for both clusters. First, go to your Manage Account page in Workbench and copy the @ARVADOS_API_HOST@ and @ARVADOS_API_TOKEN@ in both of your clusters. Then, create two configuration files, one for each cluster. The names of the files is very important, they must match the cluster names.
19
20 <notextile>
21 <pre><code>~$ <span class="userinput">cd ~/.config/arvados</span>
22 ~$ <span class="userinput">echo "ARVADOS_API_HOST=cluster1.arvadosapi.com" >> cluster1.conf</span>
23 ~$ <span class="userinput">echo "ARVADOS_API_TOKEN=123456789abcdefghijkl" >> cluster1.conf</span>
24 ~$ <span class="userinput">echo "ARVADOS_API_HOST=cluster2.arvadosapi.com" >> cluster2.conf</span>
25 ~$ <span class="userinput">echo "ARVADOS_API_TOKEN=987654321lkjihgfedcba" >> cluster2.conf</span>
26 </code></pre>
27 </notextile>
28
29 h3. How to copy a collection
30
31 First, select the uuid of the collection you want to copy from the source cluster. The uuid can be found inside of a collection in the top left box, or from the URL bar (the part after @collections/...@)
32
33 Now copy the collection from cluster1 to cluster2. We will use the uuid cluster1-4zz18-1234567890abcde as an example.
34 <notextile>
35 <pre><code>~$ <span class="userinput">arv-copy --src cluster1 --dst cluster2 cluster1-4zz18-1234567890abcde</span>
36 cluster1-4zz18-1234567890abcde: 100M / 100M 100.0% 
37 arvados.arv-copy[1234] INFO: Success: created copy with uuid cluster2-4zz18-8765943210cdbae
38 </code></pre>
39 </notextile>
40
41 The collection will be placed in your home project in the destination cluster. If you want to place your collection inside of a pre-created project, you can specify the project you want it to be in using the tag @--project-uuid@ followed by the project uuid.
42
43 h3. How to copy a pipeline template or pipeline instance
44
45 {% include 'arv_copy_expectations' %}
46
47 When copying a pipeline template or pipeline instance recursively (copying all dependencies in the template/instance) you must have a git repository in the destination cluster.
48
49 If you do not have a repository created, you can follow the documentation here: (Point to #6014)
50
51 We will use the uuid cluster1-p5p6p-abcd123efghi45jkl as an example pipeline template/instance, and samplegitrepo/samplename.git as an example git repo.
52
53 <notextile>
54 <pre><code>~$ <span class="userinput">arv-copy --src cluster1 --dst cluster2 --dst-git-repo samplegitrepo/samplename cluster1-p5p6p-abcd123efghi45jkl</span>
55 </code></pre>
56 </notextile>
57
58 New branches in the destination git repo will be created for each branch used in the pipeline template. For example, if your source branch was named branch_name, your new branch will be named git_git_cluster1_arvadosapi_com_reponame_git_branch_name.