This topic provides details about how the Copy utility works.
The Copy utility supports wildcards (* and ?) and recursive copying. In some cases, the destination directory must already exist; in others, the utility automatically creates both the destination directory and any empty directories in the transfer.
Directories are copied first to a temporary directory on the destination machine before being copied one file at a time to the target location.
You can configure the location of this temporary directory in the eac.properties file, using the optional
setting com.endeca.eac.filetransfer.fileTransferTempDir as follows:
- If this setting is defined as an absolute path, the Copy utility uses it.
- If it is defined as a relative path, the Copy utility considers it to be relative to %ENDECA_CONF%/state/
- If it is not defined, the Copy utility uses the directory %ENDECA_CONF%/state/file_transfer/
If the Copy utility tries to copy a file to a location where another file already exists, the utility overwrites the preexisting file.
Note: The Copy utility supports both SSL and non-SSL communication, with SSL being off by default. For details on enabling SSL, see the Endeca Security Guide.
Destination directories
In most cases, the destination directory where the copied files are placed has to exist already. However, there are a few exceptions where the destination directory does not have to exist prior to the copy:
- Copying just one file to the location of an existing file.
- Copying just one file to a new file name in an existing directory.
- Copying just one directory to a new directory name in an existing parent directory.
Failure and recovery
The following situations result in a failure of the Copy utility:
There is no recovery for copies. Therefore, if the transfer of a large file fails, the entire file must be transferred again. Likewise, if a multi-file transfer fails before completion, you must either re-run the entire transfer or request only those parts that did not transfer.
Explicit machine naming
Keep in mind that when you are using the Copy utility, you are potentially working with three machines: the EAC Central Server, from which you issue eaccmd commands, the Agent machine you are copying data from, and the one you are copying data to. In such cases, the name localhost can be confusing. Unless you are using the Copy utility to move files on a single machine, you should use explicit machine names rather than simply localhost.
Delimiting wildcard elements
To prevent inappropriate expansion, any wildcard arguments you use with the Copy utility in eaccmd need to be delimited with double quotation marks. For example:
On Windows, "C:\*.txt".
On UNIX, "/home/endeca/test/*.txt".
Copying across platforms
If you are copying files or directories between machines on different platforms, you have to wrap any Window paths on a Linux or Solaris shell in double quotation marks (for example, "C:\*.txt").