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

From Web
Jump to navigation Jump to search
Line 12: Line 12:
 
<br>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:
 
<br>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:
  
<b>mkdir newdir
+
<i>mkdir newdir
 
<br>multicopy newdir @
 
<br>multicopy newdir @
<br>multicopy '@:test/*.log' @</b>
+
<br>multicopy '@:test/*.log' @</i>
  
 
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.
 
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
 
work in progress

Revision as of 11:18, 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