Difference between revisions of "Unimore PLE/Docs/Tools/Multicopy"

From Web
Jump to navigation Jump to search
 
Line 2: Line 2:
  
 
This program makes use of a parameter, @, which has different meanings depending on how it is written:
 
This program makes use of a parameter, @, which has different meanings depending on how it is written:
<br>- if alone, it is replaced by a machine (remote node) name, e.g. <i>planetlab-1.remoteDomain</i>;
+
* if alone, it is replaced by a machine (remote node) name, e.g. <i>planetlab-1.remoteDomain</i>;
<br>- if followed by a colon, that is @:, it is replaced by slice name at the remote nodes, e.g. <i>yourSliceName@planetlab-1.remoteDomain</i>.
+
* if followed by a colon, that is @:, it is replaced by slice name at the remote nodes, e.g. <i>yourSliceName@planetlab-1.remoteDomain</i>.
  
 
So, if you want to transfer a local file to remote nodes in a particular directory, e.g. test, you run
 
So, if you want to transfer a local file to remote nodes in a particular directory, e.g. test, you run

Latest revision as of 11:24, 2 November 2009

<accesscontrol>luser</accesscontrol>

This program makes use of a parameter, @, which has different meanings depending on how it is written:

  • if alone, it is replaced by a machine (remote node) name, e.g. planetlab-1.remoteDomain;
  • if followed by a colon, that is @:, it is replaced by slice name at the remote nodes, e.g. yourSliceName@planetlab-1.remoteDomain.

So, if you want to transfer a local file to remote nodes in a particular directory, e.g. test, you run

multicopy filename @:test

and MultiCopy will start scp with proper parameters for copying the file to the nodes specified in the node list.
If you want, instead, to copy files from remote nodes to the local host, you can create local directories using remote node names and then copy the files you need into their folders, using this syntax on the local host:

mkdir newdir
multicopy newdir @
multicopy '@:test/*.log' @

In this way, you create a directory called "newdir" on the local host, then you make copies of it using the remote machine names (thanks to @ parameter). After that, you copy the log files from the remote directory "test" from each remote node into the local directories corresponding to the remote node name.

work in progress