Unimore PLE/Docs/Tools/Multicopy: Difference between revisions
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
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: | ||
* if alone, it is replaced by a machine (remote node) name, e.g. <i>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 | ||
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: | ||
< | <i>mkdir newdir | ||
<br>multicopy newdir @ | <br>multicopy newdir @ | ||
<br>multicopy '@:test/*.log' @</ | <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 |
Latest revision as of 10: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