Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


4.13.20 Copy file

Function

Copies a file or folder on a specified path to a specified file or folder.

This plugin assumes the following server:

• Execution target server

This is the server onto which the file or folder is to be copied.

If the OS of the target server is UNIX and the common.permissionOption property value is 1, the plugin copies the specified file or folder while retaining its owner, group, permissions, and timestamp. If you want to copy a file or folder without retaining these attributes or if the OS is Windows, specify 0 for this property value.

Use situation

You use this plugin to back up application definition files and to output command execution results to a file.

Prerequisites

For the latest support information about [Required product in the System]/[Required products on the execution target server]/[OS running in the execution target server], see the release notes.

[Required product in the System]

JP1/Automatic Operation 11-00 or later

[Required products on the execution target server]

None.

[OS running in the execution target server]

(1) Windows Server 2008 R2 Standard/Enterprise/Datacenter

(2) Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter

(3) Windows Server 2016 Standard/Datacenter

(4) Windows Server 2019 Standard/Datacenter

(5) Red Hat Enterprise Linux Server 6 (32-bit x86), Red Hat Enterprise Linux Server 6 (64-bit x86_64)

(6) Red Hat Enterprise Linux Server 7 (64-bit x86_64)

(7) Red Hat Enterprise Linux Server 8 (64-bit x86_64)

(8) CentOS 6 (64-bit x86_64)

(9) CentOS 7 (64-bit x86_64)

(10) CentOS 8 (64-bit x86_64)

(11) Oracle Linux 8 (64-bit x86_64)

(12) AIX V6

(13) AIX V7

[Usage conditions for the target server]

None.

Cautions

(1) If an existing file or folder is specified in the common.destFilePath property, that file or folder will be overwritten.

(2) If a hidden file exists in a folder that is specified in the common.sourceFilePath property, that file will not be copied.

Version

03.01.01

Plug-in tags

Control OS,Windows,Linux,AIX

Plug-in name displayed in the task log

osCopyFile

Return code

0: Normal

21: Error (invalid environment) Command cannot be found (error detected in the plugin script)

27: Error (check task logs for the nature of error)

41: Error (error detected in plugin) Missing property (error detected in plugin script)

Property list

The following table lists the properties:

Property key

Property name

Description

Default value

I/O type

Required

plugin.destinationHost

Host name of the execution target server

Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported.

localhost

Input

R

common.sourceFilePath

Full path of the copy source file

Specify the full path of the copy-source file or folder.

--

Input

R

common.destFilePath

Full path of the copy destination file

Specify the full path of the copy-destination file or folder.

--

Input

R

common.permissionOption

Whether to retain file attributes

Specify whether to copy the file attributes (mode, ownership, and timestamps). Specifying 1 copies them, and specifying 0 does not.

--

Input

R

common.returnValue

Return value for the plugin

The return value of this plugin stored.

--

Output

O