Module copyfrom
source code
copyfrom [-Crpx] -c CLUSTER FILES LOCAL_DIR
Copies FILES
from each node of the specified
CLUSTER
to LOCAL_DIR
. If CLUSTER
is omitted, then the default cluster is used. FILES
identifies files on nodes of the cluster. It must be an absolute path,
(i.e. must begin with '/'
) and may specify multiple files,
e.g. /foo/bar*/*.[0-9]
. LOCAL_DIR
is a
directory on the node from which the command is being issued.
copyfrom
will normally populate a directory under
LOCAL_DIR
for each node in the cluster, creating the
subdirectories if necessary. The name of the subdirectory will be the
same as the node's name, specified in .oshrc
. But if
-x
is specified, then subdirectories will not be populated;
files will be placed directly in LOCAL_DIR
. The
-x
option is supported only for single-node clusters.
copyfrom
is implemented using scp
, and the
following scp
flags are supported:
-
-C
: enable compression.
-
-r
: recursive copy
-
-p
: preserve modification times, access times, and
modes.
|
copyfrom(cluster,
files,
local_dir,
compress=False,
recursive=False,
preserve=False,
no_subdirs=False)
Copies files from each node of the specified
cluster to local_dir . |
source code
|
|
|
|
copyfrom(cluster,
files,
local_dir,
compress=False,
recursive=False,
preserve=False,
no_subdirs=False)
| source code
|
Copies files from each node of the specified
cluster to local_dir . If
no_subdirs is False, then a subdirectory under
local_dir is created for each node of the cluster and the
files from a node are copied to that node's subdirectory. If
no_subdirs is true, then cluster must be a
single-node cluster, no subdirectory is created, and files are copied
directly into local_dir . Compression is used for copying if
compress is True. Directories are copied recursively if
recursive is True. File attributes are preserved if
preserve is True.
|