lsrcp

Remotely copies files through LSF.

Synopsis

lsrcp [-a] source_file target_file
lsrcp [-h | -V]

Description

The lsrcp command is a load-sharing remote copy program that transfers a single file between hosts in an LSF cluster. The lsrcp command uses RES on an LSF host to transfer files. If LSF is not installed on a host or if RES is not running, then lsrcp uses rcp to copy the file.

If the LSF_REMOTE_COPY_CMD parameter is defined in the lsf.conf file, the lsrcp command uses the specified command and options to copy the file if the RES cannot copy the file.

To use lsrcp, you must have read access to the file to be copied. Both the source and target file must be owned by the user who enters the command.

When using lsrcp with the LSF multicluster capability, you must open non-privileged ports between all clusters. This is because lsrcp uses random non-privileged ports to communicate.

The lsrcp command uses the rcp command to copy a source file to a target file owned by another user.

Options

-a
Appends source_file to target_file.
source_file target_file
Specify an existing file on a local or remote host that you want to copy, and a file to which you want to copy the source file.

The file has the following format:

[[user_name@]host_name:][path/]file_name
user_name
Login name to be used for accessing files on the remote host. If user_name is not specified, the name of the user who entered the command is used.
host_name
Name of the remote host where the file is located. If host_name is not specified, the local host, the host from which the command was entered, is used.
path
Absolute path name or a path name relative to the login directory of the user. Shell file name expansion is not supported on either the local or remote hosts. Only single files can be copied from one host to another.

Use a backslash () to transfer files from a Windows host to another Windows host.

C:∖share> lsrcp file1 hostA:c:∖temp∖file2

Use a forward slash (/) to transfer files from a UNIX host to a UNIX host.

lsrcp file1 hostD:/home/usr2/test/file2

Always use a forward slash (/) to transfer files from a UNIX host to a Windows host, or from a Windows host to a UNIX host. The operating system interprets the backslash () as an escape character, and lsrcp opens the wrong files.

For example, the following command transfers a file from UNIX to a Windows host:

lsrcp file1 hostA:c:/temp/file2

The following command transfers a file from Windows to a UNIX host:

C:∖share> lsrcp file1 hostD:/home/usr2/test/file2

file_name
Name of source file. File name expansion is not supported. File names cannot include the colon character (:).
-h
Prints command usage to stderr and exits.
-V
Prints LSF release version to stderr and exits.

Examples

lsrcp myfile user1@hostC:/home/usr/dir1/otherfile

Copies file myfile from the local host to file otherfile on hostC.

lsrcp user1@hostA:/home/myfile user1@hostB:otherfile

Copies the file myfile from hostA to file otherfile on hostB.

lsrcp -a user1@hostD:/home/myfile /dir1/otherfile

Appends the file myfile on hostD to the file otherfile on the local host.

lsrcp /tmp/myfile user1@hostF:~/otherfile

Copies the file myfile from the local host to file otherfile on hostF in the home directory of user1.

Diagnostics

The lsrcp command attempts to copy source_file to target_file using RES. If RES is down or fails to copy the source_file, the lsrcp command uses the rsh command. When the -a option is specified, the lsrcp command uses the shell command that is specified by the LSF_RSH parameter in the lsf.conf file. When the -a option is not specified, the lsrcp command uses rcp.

Limitations

File transfer with the lsrcp command is not supported in the following contexts:
  • If LSF account mapping is used, the lsrcp command fails when it runs under a different user account.
  • LSF client hosts do not run RES, so the lsrcp command cannot contact RES on the submission host.
  • The lsrcp command does not support third-party copies, when the source and target file are not on the local host. In this case, the rcp command or the rsh command (or the shell command that is specified by the LSF_RSH parameter in the lsf.conf file) is used. If the target file exists, the lsrcp command preserves the file permission modes. If the target file does not exist, the lsrcp command uses the source file modes consistent with the umask of the source host.
The following actions are supported:
  • The rcp command on UNIX. If the lsrcp command cannot contact RES on the submission host, it attempts to use the UNIX rcp command to copy the file. You must set up the /etc/hosts.equiv or HOME/.rhosts file to use the rcp command.
  • You can replace the lsrcp command with your own file transfer mechanism if it supports the same syntax as the lsrcp command. Replacing the lsrcp command can advantage of a faster interconnection network, or to overcome limitations with the existing lsrcp command. The sbatchd daemon looks for the lsrcp executable file in the LSF_BINDIR directory.

See also

rsh, rcp, res