ccp(1)ccp(1)NAMEccp - In parallel, copy files to multiple hosts or cluster-wide in a
Serviceguard cluster. ccp is part of the Distributed Systems Adminis‐
tration Utilities (DSAU).
SYNOPSIS
Path: /opt/dsau/bin/ccp
[command fanout options] [-r | -p] source_file destination_file
{-h | --help | ?}
{-V | --version}
DESCRIPTION
copies files from one system to multiple systems in parallel on either
distributed systems or in a Serviceguard cluster. In a Serviceguard
cluster, defaults to operating cluster-wide (copies across all mem‐
bers), subject to user authorization. When not in a Serviceguard clus‐
ter, defaults to issuing commands on the local host. does not recog‐
nize files in the format "rname@rhost:path" so all source files used by
must be on the local host machine. For more information on proper
authorization, see the manpage.
REMOTE COMMAND TRANSPORT OPTIONS
The user selects how runs commands on remote hosts at runtime using the
-R option. The following protocols are supported; the default is ssh.
Refer to the and manpages for the proper security setup.
· rsh
Uses an internal, thread-safe implementation of BSD to run
commands using the standard rsh(1) protocol.
· ssh
Uses a variant of to run multiple copies of the command.
Note that to yourself must work password-less, and .rhosts
must have permissions of 600.
ccp-Specific
Options
-r | --recursive recursive_directory_name/filename recursive_direc‐
tory_name
Copies directories recursively. The target directory must
exist.
-p | --preserve
(Preserve permissions.) Use this option to preserve the fol‐
lowing permissions in the copy: modification time, access
time, file mode, user ID, and group ID as allowed by permis‐
sions.
Command Fanout
Options
The target node options are:
-a reads the /etc/machines file to obtain the list of nodes.
This option has no arguments.
-{f | --hostsfile} filename
Copies filename onto nodes listed in hostsfile. Hostsfile
contains one hostname per line.
-{n | w | --nodes} host1[,host2,...]
Target the specified list of hosts. In a Serviceguard clus‐
ter, the target host list is not required and the default is
all cluster members. The host list may contain hostlist
expressions of the form "host[1-5,7]." For more information
about the hostlist format, see the HOSTLIST EXPRESSIONS sec‐
tion below. This option overrides all other host specifica‐
tion options.
-{x | -- exclude} host1[,host2,...]
Exclude the specified hosts.
Other
Options
-fanout number
Sets the maximum number of simultaneous remote commands to
number. The default is 64.
-{h | --help | ?}
Displays commands and use information from and quits.
-{l | --user} user
Copies files on remote nodes as another user, subject to
authorization.
-{R | --rcmd} {ssh | rsh}
Set remote command transport options module to ssh or rsh.
-{t | --timeout} seconds
Sets the connect timeout in seconds. Default is 10 seconds.
-{u | --ctime} seconds
Sets a limit on the amount of time a remote command is
allowed to execute. Default is no limit.
-{V | --version}
Shows the version of .
ENVIRONMENT VARIABLES
When not in a Serviceguard cluster, if no other node selection option
is used, the CFANOUT_HOSTS environment variable may be set to a file‐
name from which a list of target hosts is read. The file should con‐
tain a list of hosts, one per line.
LIMITATIONS
When using the ssh transport, password-less ssh must have already been
configured between the source and destination hosts. will not interac‐
tively prompt for passwords. Use the tool to help you configure pass‐
word-less ssh. Similarly, when using rsh, the .rhosts files on the
nodes must be properly configured. The connect timeout is not
adjustable when using ssh.
The number of nodes on which can simultaneously execute remote jobs is
limited by the maximum number of threads that can be created concur‐
rently and the availability of reserved ports in modules. The target
directory must exist when using the -r option. For additional limita‐
tions, see the manpage.
HOSTLIST EXPRESSIONS
accepts lists of hosts in the general form: prefix[n-m,l-k,...], where
n < m and l < k, and so on, as an alternative to explicit lists of
hosts. This form is not the same as regular expression character
classes (also denoted by "[]" ). For example, host[19] does not repre‐
sent an expression matching host1 or host9, but rather the degenerate
hostlist: host19.
The hostlist syntax is provided only as a convenience on systems using
a "prefixNNN" naming convention and specification of ranges should not
be considered necessary -- thus host1,host9 could be listed specifi‐
cally or as hostlist host[1,9]. Note that you can use outside a clus‐
ter so long as you specify your hostlist.
EXAMPLES
Copy a source file cluster-wide in a Serviceguard cluster.
# ccp /tmp/a /etc/b
On HP-UX, copy directories recursively to all members of the Service‐
guard cluster.
# ccp-r /etc/cmcluster/pkg1 /etc/cmcluster
On Linux, copy directories recursively to all members of the Service‐
guard cluster.
# . /etc/cmcluster.conf
# ccp-r $SGCONF/pkg1 $SGCONF
Copy a source file to a set of hosts using a hostlist specification,
using ssh (default).
# ccp-w host[01-05] source_file destination_file
Copy a file to a set of hosts using rsh.
# ccp-w host[7,9-10] -R rsh source_file destination_file
Copy a file to host0, host4, and host5 using ssh
# ccp-w host[0-5] -x host[1-3] source_file destination_file
Note that some shells interpret brackets ([ and ]) for pattern match‐
ing. Depending on your shell, you may need to enclose ranged lists
within quotes. For example, in tcsh, the node01 to node05 example
above should be executed as:
# ccp-w "host[01-05]" source_file destination_file
SEE ALSOpdsh(1), rsh(1), ssh(1), pdcp(1), cexec(1), ckill(1), cps(1), cup‐
time(1), cwall(1M) [HP-UX], cwall(1) [Linux], csshsetup(1)ccp(1)