Plugins / Plugin Help Content |
This action plug-in provides the ability to execute file operations on Orchestrator locally mounted file systems.
Parameter | Description |
---|---|
Name | The name used to identify a saved configured instance. |
Comments | Any comments about this saved configured instance. |
File operation | The operation to execute: copy, move, delete, makedir, stat, symlink, touch, dirlist, tar, untar. |
Sources | Source for the absolute directory or file paths. |
Target | Target for the absolute directory path (for copy/move operations). |
Base | The base directory, used for copy/move operations. See the explanations in the operating instructions. |
Copy block size | The copy/move block size expressed in bytes (default is 1 MB) |
Overwrite? | Overwrites files if already present in the target directory (for copy/move operations). |
Preserve timestamp? | If set, tries to preserve the source file timestamps (for copy/move operations). |
Fail on incomplete? | Returns a failure if the operation does not reach completion. |
Enter permissions | Allows chmod or chown-created directories or copied/moved files. |
chmod | The mode integer value to use while doing the chmod command. It is a 3-character octal number. |
Recursive | Indicates whether the operation should descend recursively. |
User ID | The user id to use when running the chown command. |
Group ID | The group id to use when running the chown command. |
Input | Description |
---|---|
source | Source absolute paths. |
chmod | The mode integer value to use when running the chmod command. |
guid | The group id to use when running the chown command. |
uid | The user id to use while doing the chown command. |
base | The base directory. |
operation | The operation to execute. |
preserve_timestamp | If set, tries to preserve the source file timestamps. |
target | The target directory path. |
Output | Description |
---|---|
failed_list | The files or directories unsuccessfully handled as an array. |
file_list | The files or directories successfully handled as an array. |
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.
For example, Sources = /root/foo/ Target = /root/bar/ will create the directory /root/bar/foo/.
Sources is an array type that can accommodate a single path or an array of paths, for example: Sources = /root/foo/titi.txt or Sources = ["/root/foo/titi.txt"].
Glob expressions are supported within Sources. For example, use Sources = /root/foo/*.txt to copy all files under /root/foo/ with a txt extension.
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 Sources = /root/foo/titi.txt Target = /root/bar and the bar directory does not exist, a file /root/bar will be created with the content of /root/foo/titi.txt. If instead, Target = /root/bar/ and bar directory does exist, an error will be displayed.
The touch operation will not create a file if the file does not already exist and it will not return an error in this case. If the file exists, the operation will update its timestamps.
Base is the base directory the operation should refer to. When cp /root/foo/bar.txt /home/ is called, the result is the file copied to /home/bar.txt. In the case where you want to replicate everything that is under /root/ under /home/, you would do a copy with base directory /root/ cp /root/foo/bar.txt /home/ --base /root/. The result is the file copied to /home/foo/bar.txt.