.\" .\" *********************************************************************
.\" .\" *                                                                   *
.\" .\" *             Copyright 2020-2022, Intel Corporation                *
.\" .\" *                                                                   *
.\" .\" *                       All Rights Reserved.                        *
.\" .\" *                                                                   *
.\" .\" *********************************************************************

.TH ethscpall 8 "Intel Corporation" "Copyright(C) 2020\-2022" "EFSFFCLIRG (Man Page)"
.SH NAME
ethscpall


.PP
Copies files or directories from the current system to multiple hosts in the fabric. When copying large directory trees, use the -t option to improve performance. This option tars and compresses the tree, transfers the resulting compressed tarball to each node, and untars it on each node.
.PP
Use this tool for copying data files, operating system files, or applications to all the hosts (or a subset of hosts) within the fabric.
.PP

.B NOTE:

.IP \(bu
This tool can only copy from this system to a group of systems in the cluster. To copy from hosts in the cluster to this host, use ethuploadall.
.IP \(bu
user@ style syntax cannot be used when specifying filenames.
.IP \(bu
Beware: For the -r option, when copying a single source directory, if the destination directory does not exist it will be created and the source files placed directly in it.
.IP \(bu
In other situations, the -r option will copy the source directory as a directory under the destination directory.
.IP \(bu
The -R option will always copy the source directory as a directory under the destination directory.
.IP \(bu
The -t option will always place the files found in source\(uldir directly in the destination directory.

.SH Syntax

.PP

.br
ethscpall [-pq] [-r|-R] [-f  \fIhostfile\fR] [-h \[aq]\fIhosts\fR\[aq]] [-u  \fIuser\fR] [-B  \fIinterface\fR]
.br
source\(ulfile ... dest\(ulfile

.br

.PP

.br
ethscpall [-t] [-pq] [-Z  \fItarcomp\fR] [-f  \fIhostfile\fR] [-h \[aq]\fIhosts\fR\[aq]] [-u  \fIuser\fR] [-B  \fIinterface\fR]
.br
[ \fIsource\(uldir\fR [ \fIdest\(uldir\fR]]

.br

.SH Options

.TP 10
--help

Produces full help text.
.TP 10
-p

Performs copy in parallel on all hosts.
.TP 10
-q

Don\[aq]t list files being transferred.
.TP 10
-r

Performs recursive copy of directories using scp.
.TP 10
-R

Performs recursive copy of directories using rsync (only copy changed files).
.TP 10
-t

Performs optimized recursive copy of directories using tar. \fIdest\(uldir\fR is optional. If \fIdest\(uldir\fR is not specified, it defaults to the current directory name. If both \fIsource\(uldir\fR and \fIdest\(uldir\fR are omitted, they both default to the current directory name.

.TP 10
-h \fIhosts\fR

Specifies the list of hosts to copy to.
.TP 10
-f \fIhostfile\fR

Specifies the file with hosts in cluster. Default is /etc/eth-tools/hosts file.
.TP 10
-u \fIuser\fR

Specifies the user to perform copy to. Default is current user code.
.TP 10
-B \fIinterface\fR

Local network interface to use for scp or rsync Note the destination hosts specified must be accessible via the given \fIinterface\fR\[aq]s IP subnet. This may imply the use of alternate hostnames or IP addresses for the destination hosts

.TP 10
-Z \fItarcomp\fR

A simple tar compression option to use, such as --xz or --lzip. When host list is large better compression may be preferred. When host list is small faster compression may be preferred. -Z \[aq] \[aq] will not use compression. Default is -z.

.TP 10
\fIsource\(ulfile\fR

Specifies the file or list of source files to copy.

.TP 10
\fIsource\(uldir\fR

Specifies the name of the source directory to copy. If omitted, current working directory is used.

.TP 10
\fIdest\(ulfile\fR or \fIdest\(uldir\fR

Specifies the name of the destination file or directory. If copying multiple files, use a directory name instead as the destination. If the file or directory name is omitted, the source file or current directory name is used respectively.

.SH Example
# efficiently copy an entire directory tree
.br

ethscpall -t -p /usr/src/eth/mpi\(ulapps /usr/src/eth/mpi\(ulapps
.br


.br

# copy a group of files
.br

ethscpall a b c /root/tools/
.br


.br

# copy to an explitly specified set of hosts
.br

ethscpall -h \[aq]arwen elrond\[aq] a b c /root/tools
.br

HOSTS=\[aq]arwen elrond\[aq] ethscpall a b c /root/tools
.br


.br

# copy to an explitly specified set of hosts over local eth2 nic
.br

echscpall -h \[aq]arwen elrond\[aq] -B eth2 a b c /root/tools
.SH Environment Variables

.PP
The following environment variables are also used by this command:
.TP 10
\fBHOSTS\fR

List of hosts; used if -h option not supplied.

.TP 10
\fBHOSTS\(ulFILE\fR

File containing list of hosts; used in absence of -f and -h.

.TP 10
\fBFF\(ulMAX\(ulPARALLEL\fR

When the -p option is used, maximum concurrent operations are performed.
