9369: arvados-cwl-runner documentation and examples, add deprecation notices to pipel...
[arvados.git] / doc / user / topics / arv-copy.html.textile.liquid
index ae72df8aabc0b9c85a3a22c32f0f68a1497c02aa..ed0a126a41cf6d07f018ff7fe00cad49d5b32fd8 100644 (file)
@@ -1,7 +1,7 @@
 ---
 layout: default
 navsection: userguide
-title: "How arv-copy works"
+title: "Using arv-copy"
 ...
 
 
@@ -9,63 +9,72 @@ This tutorial describes how to copy Arvados objects from one cluster to another
 
 {% include 'tutorial_expectations' %}
 
-Also note that they must work from a machine with an SSH key that is allowed to access both clusters (required to copy git repositories).
+h2. arv-copy
 
-h2. Arv-copy
+@arv-copy@ allows users to copy collections and pipeline templates from one cluster to another. By default, @arv-copy@ will recursively go through a template and copy all dependencies associated with the object.
 
-@arv-copy@ allows users to copy collections, pipeline templates, and pipeline instances, including all their dependencies from one cluster to another.
+For example, let's copy from the <a href="https://cloud.curoverse.com/">cloud instance *qr1hi*</a> to *dst_cluster*. The names *qr1hi* and *dst_cluster* are interchangable with any cluster name. You can find the cluster name from the prefix of the uuid of the object you want to copy. For example, in *qr1hi*-4zz18-tci4vn4fa95w0zx, the cluster name is qr1hi.
 
-Suppose we want to copy from one cloud cluster to another. For example cluster "one" to cluster "two". The names "one" and "two" are interchangable with any cluster name.
+In order to communicate with both clusters, you must create custom configuration files for each cluster. In the Arvados Workbench, click on the dropdown menu icon <span class="fa fa-lg fa-user"></span> <span class="caret"></span> in the upper right corner of the top navigation menu to access the user settings menu, and click on the menu item *Current token*. 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 must have the format of *uuid_prefix.conf*. In our example, let's make two files, one for *qr1hi* and one for *dst_cluster*. From your *Current token* page in *qr1hi* and *dst_cluster*, copy the @ARVADOS_API_HOST@ and @ARVADOS_API_TOKEN@.
 
-First we have to make configuration files for both clusters.
+!{display: block;margin-left: 25px;margin-right: auto;}{{ site.baseurl }}/images/api-token-host.png!
+
+Copy your @ARVADOS_API_HOST@ and @ARVADOS_API_TOKEN@ into the config files as shown below in the shell account from which you are executing the commands. For example, the default shell you may have access to is shell.qr1hi. You can add these files in ~/.config/arvados/ in the qr1hi shell terminal.
 
 <notextile>
 <pre><code>~$ <span class="userinput">cd ~/.config/arvados</span>
-~$ <span class="userinput">echo "ARVADOS_API_HOST=one.arvadosapi.com" >> one.conf</span>
-~$ <span class="userinput">echo "ARVADOS_API_TOKEN=123456789abcdefghijkl" >> one.conf</span>
-~$ <span class="userinput">echo "ARVADOS_API_HOST=two.arvadosapi.com" >> two.conf</span>
-~$ <span class="userinput">echo "ARVADOS_API_TOKEN=987654321lkjihgfedcba" >> two.conf</span>
+~$ <span class="userinput">echo "ARVADOS_API_HOST=qr1hi.arvadosapi.com" >> qr1hi.conf</span>
+~$ <span class="userinput">echo "ARVADOS_API_TOKEN=123456789abcdefghijkl" >> qr1hi.conf</span>
+~$ <span class="userinput">echo "ARVADOS_API_HOST=dst_cluster.arvadosapi.com" >> dst_cluster.conf</span>
+~$ <span class="userinput">echo "ARVADOS_API_TOKEN=987654321lkjihgfedcba" >> dst_cluster.conf</span>
 </code></pre>
 </notextile>
 
-Your ARVADOS_API_TOKEN can be found in the manage accounts page in Workbench under Current Token.
-
-Once you have your config files ready, you can start copying!
-
-Here are some examples:
+Now you're ready to copy between *qr1hi* and *dst_cluster*!
 
 h3. How to copy a collection
 
-First, copy the uuid of the collection you want to copy from the cluster you want to copy from. The uuid can be found inside of a collection in the top left box, or from the URL bar (the part after @collections/...@)
+First, select the uuid of the collection you want to copy from the source cluster. The uuid can be found in the collection display page in the collection summary area (top left box), or from the URL bar (the part after @collections/...@)
 
-Now copy the collection from cluster one to cluster two. We will use the uuid one-4zz18-1234567890abcde as an example.
+Now copy the collection from *qr1hi* to *dst_cluster*. We will use the uuid @qr1hi-4zz18-tci4vn4fa95w0zx@ as an example. You can find this collection in the <a href="https://cloud.curoverse.com/collections/qr1hi-4zz18-tci4vn4fa95w0zx">lobSTR v.3 project on cloud.curoverse.com</a>.
 <notextile>
-<pre><code>~$ <span class="userinput">arv-copy --src one --dst two one-4zz18-1234567890abcde</span>
+<pre><code>~$ <span class="userinput">arv-copy --src qr1hi --dst dst_cluster qr1hi-4zz18-tci4vn4fa95w0zx</span>
+qr1hi-4zz18-tci4vn4fa95w0zx: 6.1M / 6.1M 100.0%
+arvados.arv-copy[1234] INFO: Success: created copy with uuid dst_cluster-4zz18-8765943210cdbae
 </code></pre>
 </notextile>
 
-The output should be like this:
+The output of arv-copy displays the uuid of the collection generated in the destination cluster. By default, the output is placed in your home project in the destination cluster. If you want to place your collection in 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.
 
-<notextile>
-<pre><code>
-one-4zz18-1234567890abcde: 100M / 100M 100.0% 
-arvados.arv-copy[1234] INFO: Success: created copy with uuid two-4zz18-8765943210cdbae
+For example, this will copy the collection to project dst_cluster-j7d0g-a894213ukjhal12 in the destination cluster.
+
+<notextile> <pre><code>~$ <span class="userinput">arv-copy --src qr1hi --dst dst_cluster --project-uuid dst_cluster-j7d0g-a894213ukjhal12 qr1hi-4zz18-tci4vn4fa95w0zx</span>
 </code></pre>
 </notextile>
 
-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@
+h3. How to copy a pipeline template
+
+{% include 'arv_copy_expectations' %}
 
-h3. How to copy a pipeline template or pipeline instance
+We will use the uuid @qr1hi-p5p6p-9pkaxt6qjnkxhhu@ as an example pipeline template.
 
-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.
+<notextile>
+<pre><code>~$ <span class="userinput">arv-copy --src qr1hi --dst dst_cluster --dst-git-repo $USER/tutorial qr1hi-p5p6p-9pkaxt6qjnkxhhu</span>
+To git@git.dst_cluster.arvadosapi.com:$USER/tutorial.git
+ * [new branch] git_git_qr1hi_arvadosapi_com_arvados_git_ac21f0d45a76294aaca0c0c0fdf06eb72d03368d -> git_git_qr1hi_arvadosapi_com_arvados_git_ac21f0d45a76294aaca0c0c0fdf06eb72d03368d
+arvados.arv-copy[19694] INFO: Success: created copy with uuid dst_cluster-p5p6p-rym2h5ub9m8ofwj
+</code></pre>
+</notextile>
 
-If you do not have a repository created, you can follow the documentation here: (Point to #6014)
+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 ac21f0d45a76294aaca0c0c0fdf06eb72d03368d, your new branch will be named @git_git_qr1hi_arvadosapi_com_reponame_git_ac21f0d45a76294aaca0c0c0fdf06eb72d03368d@.
 
-Once you have your repository created, you can copy your pipeline template/instance. We will use the uuid one-p5p6p-abcd123efghi45jkl as an example, and samplegitrepo/samplename.git as an example git repo.
+By default, if you copy a pipeline template recursively, you will find that the template as well as all the dependencies are in your home project.
+
+If you would like to copy the object without dependencies, you can use the @--no-recursive@ tag.
+
+For example, we can copy the same object using this tag.
 
 <notextile>
-<pre><code>~$ <span class="userinput">arv-copy --src one --dst two --dst-git-repo samplegitrepo/samplename.git one-p5p6p-abcd123efghi45jkl</span>
+<pre><code>~$ <span class="userinput">arv-copy --src qr1hi --dst dst_cluster --dst-git-repo $USER/tutorial --no-recursive qr1hi-p5p6p-9pkaxt6qjnkxhhu</span>
 </code></pre>
 </notextile>
-
-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_one_arvadosapi_com_reponame_git_branch_name.