Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.4.1 Transfer files

Description

This operation component transfers files.

Specify host names or IP addresses to acquire files from the specified host, and then copy to another host.

Options

Basic Options

(1) hostname

Host name or IP address of the file transfer destination.

To set the file transfer destination on the Management Server, specify the following:

  • For IPv4: 'localhost' or '127.0.0.1'

  • For IPv6: 'localhost' or '::1'

An argument error occurs if the host name or IP address of the file transfer destination is omitted.

The maximum length of the host name or IP address of the file transfer destination is 1,024 characters. An argument error occurs if this is exceeded.

(2) sourcehostname

Host name or IP address of the file transfer source.

To set the file transfer source on the Management Server, specify the following:

  • For IPv4: 'localhost' or '127.0.0.1'

  • For IPv6: 'localhost' or '::1'

An argument error occurs if the host name or IP address of the file transfer source is omitted.

The maximum length of the host name or IP address of the file transfer source is 1,024 characters. An argument error occurs if this is exceeded.

When hostname and source hostname match, the file is copied to the specified host.

If the Business Server specified as the file transfer target is different from file transfer source, then the files are transferred from the source host to the Management Server, and from there to the target host.

(3) sourcefile

The name (full path) of the transfer source file.

When FTP is used and the source server is not the Management Server, specify the name of the file using a relative path starting from the home directory of the FTP server.

Binary files (such as image files and compressed files) and text files can be specified.

If a text file is specified, the file is transferred without character code conversion.

An argument error occurs if the file name is omitted.

The maximum length of the file name is 255 characters. An argument error occurs if this is exceeded.

(4) destinationfile

The name (full path) of the transfer destination file.

When FTP is used and the destination server is not the Management Server, specify the name of the file using a relative path starting from the home directory of the FTP server.

An argument error occurs if the file name is omitted.

The maximum length of the file name is 255 characters. An argument error occurs if this is exceeded.

Advanced Options

(1) connectiontype

This is the method used for communication with the host.

Specify "File Transfer Infrastructure", "SSH" or "FTP". This option is not case sensitive.

An argument error will occur if a value other than those listed above is specified.

If the communication method was not entered, a method will be searched for and used.

(2) ostype

OS type of the file transfer destination host.

Specify Windows or Linux or Solaris. This option is not case sensitive.

If the OS type is omitted, the Configuration Management Database (CMDB) will be searched based on the specified host name or IP address, and Systemwalker Runbook Automation automatically sets the acquired OS type as the value.

The maximum length of the OS type is 1,024 characters. An argument error occurs if this is exceeded.

(3) username

Name of the user connecting with SSH or FTP to the file transfer destination host.

If the connected user name and password required for connection are not specified, the Configuration Management Database (CMDB) is searched based on the specified host name or IP address and Systemwalker Runbook Automation automatically sets the acquired connected user name as the value.

If the operation component connects with the file transfer infrastructure, the connected user name will be fixed at either of the following names and cannot be changed. In this case, the user name is ignored even if specified.

  • If the Business Server is running on Windows: SYSTEM user

  • If the Business Server is running on Linux or Solaris: root

The maximum length of the connected user name is 1,024 characters. Argument error occurs if this is exceeded.

(4) password

Password of the user connecting with SSH or FTP to the file transfer destination host.

If the connected user name and password required for connection are not specified, the Configuration Management Database (CMDB) is searched based on the specified host name or IP address and Systemwalker Runbook Automation automatically sets the acquired connected user name as the value.

If it connects with file transfer infrastructure, the connected user password is invalid.

The maximum length of the connected user password is 1,024 characters. Argument error occurs if this is exceeded.

(5) charactercode

This is the character encoding for the host to which the file is to be sent.

This option does not take effect if 'localhost', '127.0.0.1 or '::1' is specified for "hostname".

Specify "UTF-8", "SJIS" or "EUC". This option is not case sensitive.

An argument error will occur if a value other than "UTF-8", "SJIS" and "EUC" is specified.

If this option is omitted, the behavior will be as follows:

- If the communication method is FTP, this option will be set to "UTF-8".

- If the communication method is not FTP, the character encoding for the destination host will be detected automatically.

(6) sourceostype

OS type of the file transfer source host.

Specify Windows or Linux or Solaris. This option is not case sensitive.

If the OS type is omitted, the Configuration Management Database (CMDB) will be searched based on the specified host name or IP address, and Systemwalker Runbook Automation automatically sets the acquired OS type as the value.

The maximum length of the OS type is 1,024 characters. An argument error occurs if this is exceeded.

(7) sourceusername

Name of the user connecting with SSH or FTP to the file transfer source host.

If the user name of the file transfer source and password required for connection are omitted, the Configuration Management Database (CMDB) is searched based on the specified host name or IP address and Systemwalker Runbook Automation automatically sets the acquired connected user name as the value.

If the operation component connects with the file transfer infrastructure, "sourceusername" will be fixed at either of the following names and cannot be changed. In this case, the user name is ignored even if specified.

  • If the Business Server is running on Windows: SYSTEM user

  • If the Business Server is running on Linux or Solaris: root

The maximum length of the connected user name is 1,024 characters. Argument error occurs if this is exceeded.

(8) sourcepassword

Password of the user connecting with SSH or FTP to the file transfer source host.

If the user name of the file transfer source and password required for connection are omitted, the Configuration Management Database (CMDB) is searched based on the specified host name or IP address and Systemwalker Runbook Automation automatically sets the acquired connected user name as the value.

If it connects with file transfer infrastructure, the connected user password is invalid.

The maximum length of the connected user password is 1,024 characters. Argument error occurs if this is exceeded.

(9) sourcecharactercode

This is the character encoding for the host from which the file is to be sent.

This option does not take effect if either 'localhost', '127.0.0.1' or '::1' is specified for "sourcehostname".

Specify "UTF-8", "SJIS" or "EUC". This option is not case sensitive.

An argument error will occur if a value other than "UTF-8", "SJIS" and "EUC" is specified.

If this option is omitted, the behavior will be as follows:

- If the communication method is FTP, this option will be set to "UTF-8".

- If the communication method is not FTP, the character encoding for the destination host will be detected automatically.

(10) timeout

This is the completion timeout (seconds) for the execution of operation components.

Values between 300 and 86400 (1 day) can be specified.

For example: When timeout is to occur every 10 minutes: 600

When the execution of the operation components is not completed even if the specified time passes, the processing of the operation components is interrupted in return value 201.

(11) retry

This is the retry count for the execution of operation components.

When the operation components end in return value 161, the retry count is specified. Values between 0 and 5 can be specified.

As a result of retrying, if the operation components ended by the return values other than 161, the execution of the operation components ends even if it doesn't reach the specified retry count. The return values of the operation components become the value executed at the end.

For example: When retries are to be performed twice: 2

(12) retry_interval

This is the retry interval (seconds) for operation components.

When the operation components end in return value 161, the retry interval is specified. Values between 1 and 14400 can be specified.

For example: When retrying in 300 seconds: 300


If the specification of the timeout, retry, and retry_interval is omitted, and a value beyond the limits of the above-mentioned is input, the value specified with the operation components definition file becomes effective. Refer to "2.5 Definition File for Operation Components" for details.

Return Values

Icon

Name

Return value

Description

Success

0

Transferring the file was successful.

Failure

161

Failed to transfer the file. Retried if a retry count has been specified.

177

Failed to access the file.

187

Authentication failed when an attempt was made to connect to the Business Server over the network (using SSH or FTP).

Alternatively, an error occurred during the processing of communications with the Business Server (file transfer infrastructure). In this case, the error code for the file transfer infrastructure is output to the execution results. Refer to "3.21 Detailed Code of File Transfer Infrastructure" for information on error codes.

188

When an operation component was performing an operation on a Business Server where an RBA Agent has not been installed, the network communications (SSH, FTP) with the Business Server was closed.

189

An attempt to connect to the Business Server over the network (using SSH or FTP) failed.

Alternatively, an error occurred during the processing of communications with the Business Server (file transfer infrastructure). In this case, the error code for the file transfer infrastructure is output to the execution results. Refer to "3.21 Detailed Code of File Transfer Infrastructure" for information on error codes.

197

There is an error in the input information.

200

Transferring of file terminated abnormally.

-

-

201

Execution of operation component timed out.

202

The operation component was not executed. There is a problem in the setting to execute operation components.

203

Failed to execute the operation component. There is a problem in the Operation Automation Server environment.

205

The operation component was not executed. There is a problem with the input information specification of the operation component.

206

The operation component was not executed normally. There is a problem with the output information specification of the operation component.

207

The operation components were not executed. There is a possibility that the operation components are not registered in the Management Server.

208

The Automated Operation Process has been canceled because the Automated Operation Process was recovered while the operation component was executing.

Output information

Variable

Description

message

This variable will be set to the following message if the file is transferred successfully.

The operation component was successful.

If the file transfer fails, the content of the error will be output as a string.

returnCode

This variable is set to the return value.

Notes