bpcp

Name

bpcp -- Copies files and/or directories between cluster machines.

Synopsis

bpcp [-h ] [-v ] [-a] [-p ] [-r ] [host1: {file1 }] [host2: {file2 }]

Description

The bpcp utility is part of the BProc package and is installed by default. It is similar to the Linux rcp command. bpcp will copy files and/or directories between machines. Each file or directory is either a remote file name of the form rhost:path or a local file name. You must have read permission on the source and write permission on the destination. bpcp also handles node-to-node copies, where neither the source nor destination files are on the current node.

Options

The following options are available to the bpcp program.

-h Print the bpcp usage message and exit. If -h is the first option, all other options will be ignored. If -h is not the first option, the other options will be parsed up to the -h option, but no action will be taken.
-v Print the bpcp version number and exit. If -v is the first option, all other options will be ignored. If -v is not the first option, the other options will be parsed up to the -v option, but no action will be taken.
-a Copy the local file(s) to every up node. This option does not allow for a host1 option specifying a source node, nor for a host2 option specifying a target node.
-p Preserve the attributes of the source files, ignoring the umask. By default, bpcp will modify the time, permission bits, user and group information when the file is copied. This parameter will cause time and permission bits to be unchanged, but the user and group will change to reflect the new user.
-r Descend source directory tree recursively and copy files and tree to destination. In this case, the destination must be a directory.
[host1:]file1
The name of the file to be copied (and optionally the name of the host it resides on if other than the local host). file1 can be the directory name when used with the -r option.
[host2:]file2
The name of the file and/or host where the specified file should be copied. file2 can be a directory name.

Examples

Copy file1 from the master node to compute node 1 as file2 in /home/user. Like cp, the directory will not be created if it does not exist.

[user@cluster user] $ bpcp /home/user/file1 1:/home/user/file2

Copy file1 from the master node to every up compute node as file2 in /home/user. Like cp, the directory will not be created if it does not exist.

[user@cluster user] $ bpcp -a /home/user/file1 /home/user/file2

Copy all files and sub-directories from compute node 2 in /home/user to compute node 1 in /home/user. The directory tree will be created if it does not exist.

[user@cluster user] $  bpcp -r 2:/home/user/ 1:/home/user/

Using node 1 as an intermediary, copy file1.txt on node 0 to file1.txt on node 2.

[user@cluster user] $ bpsh 1 bpcp 0:/tmp/file1.txt 2:/tmp/

Copy /tmp/file.txt from the master node to the /tmp directory on every node in the cluster that is "up".

[user@cluster user] $ bpsh -a bpcp master:/tmp/file1.txt /tmp

Note: bpcp will give an "rfork: Invalid argument" message when the node is unreachable.