Top
Systemwalker Operation Manager  Reference Guide
FUJITSU Software

10.1.2 fcopysvr File Transfer Command

Synopsis

fcopysvr /s:SourceName [/su:SourceUserName]
        /d:DestName [/du:DestUserName]
        [/lg:LoginGroup] [/a | /b] [/rc:nn /ri:nnnn]

Description

The fcopysvr command transfers files between servers. The files that can be transferred using this command are the local files (including directories on the NFS server) or files on the FTP server.

Parameters

/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 part of path name must be no longer than 255 characters. If the path name contains a space character, enclose it in double quotation marks.

A local drive path:

Specify an absolute path from the root directory.

Specify the path name of desired file directly after "file://" string.

Example:

If the file path is "/usr/database/database.db":

file:///usr/database/database.db

A path on the FTP server:

Specify a path name to the FTP server.

The path name can be specified with a full path name or a 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.

Example) To specify using the full path name:

ftp://foo.bar.com//usr/database/database.db

Example) To specify using the relative path name:

ftp://foo.bar.com/database/database.db

/su:SourceUserName

Specifies a name of the user to be used to access the file specified in SourceName, and the user name to be specified must be set in the password management book in advance. SourceUserName must be no longer than 20 alphanumeric characters. If SourceUserName contains a space character, enclose it in double quotation marks.

If SourceName is specified using a local path, this parameter's specification is ignored. 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 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.

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 this parameter must be set in the password management book in advance. DestUserName must be no longer than 20 alphanumeric characters. If DestUserName contains a space character, enclose it in double quotation marks.

If DestName is specified using a local path, this parameter's specification is ignored. However, if DestName is specified using a path on the FTP server, be sure to specify this parameter.

/lg:LoginGroup

Specifies a login definition name used to manage the password management book. LoginGroup must be no longer than 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.

/b

Transfers a file in the binary mode.

This parameter is valid only when you transfer files on the FTP server.

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, no retry is performed.

If a wildcard is used to specify the transfer source file or transfer destination file, retry is performed only for the failed file.

/ri:nnnn

Specifies the retry interval in case an error occurs.

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.

This parameter is valid if 1 or a greater value is specified to nn in the /rc parameter.

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 the following example, the local file "/usr/database/master/database.db" on the server is transferred to the local file "/usr/database/database.db". If the transfer fails, retry is performed up to three times at an interval of 60 seconds.

fcopysvr /s:file:///usr/database/master/database.db
          /d:file:///usr/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
[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 wildcard is used, 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 performing file transfer, 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