HMC Manual Reference Pages  - CPFILE (1)

NAME

cpfile - copy file

CONTENTS

Synopsis
Description
Options
Examples
Environment
Bugs
Author
See Also

SYNOPSIS

cpfile -t modelmap -l {l | r} -f file-name -o {import | export}
[-h host-name -u user-ID [--passwd password]] [--help]

DESCRIPTION

cpfile copies a file to or from the Hardware Management Console (HMC) and the local HMC file system, removable media, or a remote system using secure File Transfer Protocol (FTP).

This command allows a user to copy a file to or from a directory on the HMC to which the user does not have write access. The type of file specified determines the directory.

OPTIONS

-t The type of file to copy. The only valid value is modelmap for an XML file which indicates the HMC is managing an IBM Smart Analytics Solution. This file describes an appliance model ID and its associated server model ID and is used during a call-home event to associate the failing server model to the appliance model.
-l The location of the file. For an import operation, this is the source location of the file. For an export operation, this is the destination location of the file. Valid values are l for the local HMC file system or removable media, or r for a remote secure FTP server.

When copying a file to or from removable media, the media must be present in the removable media device and the device must be mounted with the mount command before this command is issued. The lsmediadev command can be used to display all of the removable media devices on the HMC.

-f The fully qualified name of the file to copy. If the file already exists in the destination location, it will be overwritten.
-o The direction of the copy. Valid values are import to copy the file from the specified location to the destination location on the HMC, or export to copy the file from the source location on the HMC to the specified location.
-h The host name or IP address of the secure FTP server.

This option is required when copying a file to or from a secure FTP server. Otherwise, this option is not valid.

-u The user ID to use to log in to the secure FTP server.

This option is required when copying a file to or from a secure FTP server. Otherwise, this option is not valid.

--passwd The password to use to log in to the secure FTP server. If this option is omitted, you will be prompted to enter the password.

This option is only valid when copying a file to or from a secure FTP server.

--help Display the help text for this command and exit.

EXAMPLES

Copy the model mapping file called hmcModelMap.xml on a USB flash memory device (the USB flash memory device must already be connected to the HMC) to the HMC:

lsmediadev (to obtain mount points)

mount /media/sdb1

cpfile -t modelmap -l l -o import -f /media/sdb1/hmcModelMap.xml

Use scp to copy the model mapping file called myfile.xml to the user’s home directory on the HMC. Then use cpfile to copy the file into the model mapping file directory on the HMC:

scp remoteuser@remotehostname:/directory/myfile.xml /home/user

cpfile -t modelmap -l l -o import -f /home/user/myfile.xml

Copy the model mapping file on the HMC to the file /home/maps/map.xml on a remote SFTP server (you will be prompted to enter your password):

cpfile -t modelmap -l r -o export -f /home/maps/map.xml
-h sftpserver -u sftpuser

ENVIRONMENT

None

BUGS

None

AUTHOR

IBM Austin

SEE ALSO

lsmediadev


Linux CPFILE (1) May 2012
Generated by manServer 1.07 from cpfile.1 using man macros.