Remote File Operation Action Plugin



This action plug-in provides the ability to execute file operations on a remote node.

Saved Parameters Description

  • Name: The name used to identify a saved RemoteFileOperation configured instance.
  • Comments: Some comments about this saved RemoteFileOperation configured instance.
  • File operation: The operation to execute: copy, move, delete, makedir, dir list
  • Overwrite?: Overwrite files if already present in the target directory (for copy/move operations)
  • Remote node: The remote node name out of the list of defined Remote Nodes.
  • Source: Source directory or file paths. Multiple sources can be entered by clicking on Add Source.
  • Target: Target directory path (for copy/move operations).
  • Base: The base directory. For copy/move operations. See the explanations in the operating instructions.

Inputs Description

The list of inputs depends on the configuration of the RemoteFileOperation action template.

Changes in this list of inputs will override any values set in the action template.

  • source: Source path.
  • target: Target directory path.
  • base: The base directory.
  • remote_node_password: Remote node password.
  • remote_node_user : Remote node username.

Outputs description

  • Directory_list: The files or directories handled as an array. In case of a copy/move operation returns the targets.

Supported Actions

None

Dependencies

None

Operating Instructions

This plugin can be used against remote nodes installed with an Aspera transfer server (for example, Point to Point) as it uses the Aspera ascmd executable to browse files. The remote node must run an SSH server, because SSH is used for authentication purposes. The remote user name must be an operating system account. It must also be defined in /opt/aspera/etc/aspera.conf on the remote server. The referenced files/folders need to have the right permissions for the given remote user. The path to configure in Source and Target is relative to the remote user docroot as declared in /opt/aspera/etc/aspera.conf such as:

                       <user> 
                        <name>xfer</name> 
                        <file_system> 
                            <access> 
                               <paths> 
                                    <path> 
                                        <absolute>/home/xfer/data</absolute> 
                                    </path> 
                                </paths> 
                            </access> 
                        </file_system> 
                        </user>  

For example, a target directory like /foo refers to /home/xfer/data/foo on the remote server.

This plugin supports both file based and directory based operations.

If a directory is specified, all included files and subfolders will be copied/moved/deleted. Example: Source = /foo/ Target = /bar/ will create the directory /bar/foo/.

Source is an array type that can accommodate a single path or an array of paths; for example, Source = /foo/titi.txt or Source = ["/foo/titi.txt","/foo/toto.txt"].

Glob expressions (for example, *.txt) are not supported within Source.

Put a '/' at the end of the Target directory path; otherwise, if the last directory name does not exist, it will be used as the file name to be created.

For example, if Source = /foo/titi.txt Target = /bar and the directory /bar does not exist, a file called /bar will be created with the content of /foo/titi.txt.

If instead Target = /bar/ and the directory /bar/ does not exist, it will be created, and the result will be /bar/titi.txt.

Base is the base directory that the operation refers to.

Let's take a case where the user runs the following:
cp /foo1/foo2/titi.txt /bar/
The file is copied to /bar/titi.txt.
To duplicate everything that is under /foo1/ and under /bar/, copy with the base directory /foo1/, which in this case is the following:
cp /foo1/foo2/titi.txt /bar/ --base /foo1/
The file is copied to /bar/foo2/titi.txt.