Synopsis
fcopycli HostName /s:SourceName [/su:SourceUserName] /d:DestName [/du:DestUserName] [/lg:LoginGroup] [/a | /b] [/rc:nn /ri:nnnn]
Description
The fcopycli command enables file transfer by clients. This command allows the transfer of files on client to server or files on server to client. It performs file transfers using the Windows shared directories (Windows network share method) or file transfers through FTP services (FTP method).
If you wish only to perform file transfer, you can transfer files even to the destination server without having Systemwalker Operation Manager installed.
Parameters
HostName
Specifies a host name of the client which is requested to transfer a file. Specify the host name in HostName within 15 alphanumeric characters.
If HostName contains a space character, enclose it in double quotation marks.
/s:SourceName
Specify a path name of the transfer source file, including the file name. You can use a wildcard for the file name.
Since wildcard characters such as an asterisk (*) have special meaning to shell, you need to enclose SourceName with either single or double quotation marks as necessary.
Use one of the following methods to specify SourceName in the URL format. The parts of path name must be no longer than 255 characters. If the path name contains a space character, enclose it in double quotation marks.
Specify a path including a drive name.
Specify the path name of desired file directly after "file://" string.
file://c:\database\database.db
Specify a path in the format of "\\computer name\share name". For "computer name", specify a Windows-based computer name within 15 alphanumeric characters. Specify a share name within 80 bytes.
Specify the path name of desired file directly after "file://" character string.
file://\\foo\share\database\database.db
Specify a path name to the FTP server.
The path name can be specified with the full path name or the relative path name from the current directory in logging in with FTP. Specify the path name in the format of "server name/path name of desired file" directly after "ftp://" string.
ftp://foo.bar.com//usr/database/database.db
ftp://foo.bar.com/database/database.db
/su:SourceUserName
Specifies a user name to be used to access the file specified in SourceName.
And the user name to be specified to SourceUserName must be set in the password management book in advance. SourceUserName must be specified using up to 20 alphanumeric characters. If SourceUserName contains a space character, enclose it in double quotation marks.
If SourceName is specified using a local drive path or the UNC method, this parameter's specification is ignored. In this case, you need to access the target file by using the account name of user logged on to the client running the Client Task Link service.
However, if SourceName is specified using a path on the FTP server, be sure to specify this parameter.
/d:DestName
Specify a path name of the transfer destination file, including the file name. You can use a wildcard for the file name.
Since wildcard characters such as an asterisk (*) have special meaning to shell, you need to enclose DestName with either single or double quotation marks as necessary.
For DestName, specify the path name of the file in the URL format. You can use the same specification methods as those described in the above "/s:SourceName" parameter. See the "/s:SourceName" parameter.
If the file name that already exists is specified, it will be overwritten. Note that the same file path name as the one (SourceName) specified with /s should not be specified.
/du:DestUserName
Specifies a user name to be used to access the file specified in DestName.
The user name specified in DestUserName must be set in the password management book in advance. DestUserName must be specified using up to 20 alphanumeric characters. If DestUserName contains a space character, enclose it in double quotation marks.
If DestName is specified using a local drive path or the UNC method, this parameter's specification is ignored. In this case, you need to access the target file by using the account name of user logged in to the client running the Client Task Link service.
If DestName is specified using a path on the FPT server is specified, be sure to specify this parameter.
/lg:LoginGroup
Specifies a login definition name used to manage the password management book. Specify the login definition name in LoginGroup within 256 characters, and enclose it in double quotation marks if a space character is contained.
If the /su or /du parameter is specified, be sure to specify this parameter.
/a
Transfers a file in the ASCII text mode. This parameter is valid only when you transfer files on the FTP server (FTP method).
/b
Transfers a file in the binary mode. This parameter is valid only when you transfer files on the FTP server (FTP method).
If neither /a nor /b is specified, the file is transferred in the binary mode.
/rc:nn
Specifies the retry count in case an error occurs in file transfer.
Specify an integer value between 0 and 99 for nn. Setting any other value results in an error. If omitted, retry is not performed.
If a wildcard is used to specify the transfer source file and transfer destination file, retry is performed only for the failed file.
/ri:nnnn
Specifies the retry interval in case an error occurs. This parameter is valid if 1 or a greater value is specified to nn in the /rc parameter.
Specify an integer value between 0 and 9999 (in seconds) for nnnn. Setting any other value results in an error. The default value is 0.
Return Values
Return value | Meaning |
---|---|
0 | Completed |
value other than 0 | Abended |
Command Location
Solaris | /opt/FJSVsnjss/bin |
HP-UX | /opt/FHPsnjss/bin |
AIX | /opt/FAIXsnjss/bin |
Linux | /opt/FJSVsnjss/bin |
Example
In this example, the command is executed to transfer the local file "c:\database\master\database.db" on the client "foo" to the local file "d:\database\database.db". If the transfer failed, retry is performed up to three times at an interval of 60 seconds.
fcopycli foo /s:file://c:\\database\\master\\database.db /d:file://d:\\database\\database.db /rc:3 /ri:60
Execution Results/Output Format
After the command has been through processing, the information at command completion is output to the standard output.
The contents to be output are shown below:
[Process start time] MM-DD-YYYY HH:MM:SS [Client host name] HostName [Server host/User name] Server host name/user name (*) [Retry count] Number of retries performed (*) [Error] Error message (*) [File transfer] Transfer source file name Transfer destination file name (**) [Retry count] Number of retries performed (**) [Error] Error message (**) [Process end time] MM-DD-YYYY HH:MM:SS
This information is output if the /su or /du parameter is specified.
If a wild card is specified, the information of each file is output by file basis.
In [Error], "None" is output if the command completed successfully. A message is output if the command is canceled or failed. For details on the messages, see the Systemwalker Operation Manager Message Guide.
If an error occurs before transferring a file, a message is output in the following format:
[Process start time] MM-DD-YYYY HH:MM:SS [Command error] Error message [Process end time] MM-DD-YYYY HH:MM:SS
For details on the messages, see the Systemwalker Operation Manager Message Guide.
Cautions
The Client Task Link service must be already working on the client side when you use this command.
Prior to running this command, you need to configure the password management book using the password management command. See "10.3.1 lgmanage Password Management Command" or further details.
When transferring files by specifying a path on the FTP server, it can be performed only when the path on the FTP server is specified for either the transfer source or the destination. The valid combinations of file path format at source and destination are listed below. Select one of the combinations from the list.
Specifying source file | Specifying destination file | |
---|---|---|
1 | Local path method | Local path method |
2 | Local path method | UNC method |
3 | Local path method | FTP server path method |
4 | UNC method | Local path method |
5 | UNC method | UNC method |
6 | UNC method | FTP server path method |
7 | FTP server path method | Local path method |
8 | FTP server path method | UNC method |
The FTP servers available for file transfer by specifying a path on it are limited to those on which the execution results of "dir" command are displayed in the following format (with permission, number of links, owner, group, size, date, time, and file name are listed in this order, in alphanumerical notation).
-rw-rw-r-- 1 xxxxx xxxxxx 605877 Dec 19 18:44 xxxxx.xxx -rw-rw-r-- 1 xxxxx xxxxxx 560661 Dec 19 18:59 xxxxx.xxx drwx------ 4 xxxxx xxxxx 96 Jan 20 1998 xxxxx -rw-rw-r-- 1 xxxxx xxxxx 6042 Jan 25 13:38 xxxxxxxxxxx -rw-rw-r-- 1 xxxxx xxxxx 5433 Feb 3 17:11 xxxxx.xxx -rw-rw-r-- 1 xxxxx xxxxx 2155 Feb 3 17:35 xxxxx.xxx -rw-rw-r-- 1 xxxxx xxxxx 3090 Feb 1 20:13 xxxxx.xxx
To verify whether or not file transfer can be performed by using a path on the FTP server, see "10.1.2 fcopysvr File Transfer Command".
If this command is canceled, it is carried out at the point when one file has been completely transferred. Therefore, the command takes a longer time to quit if it is cancelled while a large file is being transferred.
A backslash (\) in a path name for personal computer can be interpreted as an escape sequence depending on UNIX shells. To use a backslash in such shell string, enter two backlashes (\\).
When using a wildcard for the file name specified with the /s parameter, the following considerations are needed:
The number of files to be processed at a time should be 500 or less, including the files to be processed by other Client Task Link commands.
The size per file should be 2GB or less.