The FTP Mirror action supports two operations:

  • Mirroring files and directories from the local file system to an FTP Server
  • Mirroring files and directories from an FTP Server to the local file system

This action also allows you to specify whether files that exist in both source and destination should be overwritten in the destination based on the following rules:

  • File CRC32 hash does not match (only available where FTP Server supports CRC Hashing)
  • File size of source and destination file does not match
  • Modified date of source file is newer than destination file

Specify which files should be included in the mirror operation based on file extension. Files can be excluded by name, file mask or regular expression matching.

FTP Mirror

The FTP Mirror tab provides the basic settings for the FTP Mirror operation that are required before you can run the action.

Connection

The FTP Mirror action requires you to create an FTP connection using the FTP Connect action. This determines which FTP connection the action should use.

Mirror

Mirror Local To Remote

Choose this option if you want to mirror your local files to your FTP Server.

Mirror Remote To Local

Choose this option if you want to mirror your remote files to your local file system.

Local Directory

Provide the local directory that will be used as the base directory for local files. This directory itself will not be created on the FTP Server if mirroring local to remote, the files within this directory will be mirrored to remote directory specified.

Remote Directory

Provide the remote directory that will be used as the base directory for remote files. This directory itself will not be created locally when mirroring remote to local, the files within this directory will be mirrored to the local directory specified.

Use current directory of FTP connection

Rather than specify a remote directory, you can enable this option which will use the current directory for the specified FTP connection. You can use the FTP Change Directory action to set the current directory for the FTP connection.

Options

Recursive

Enabling this options allows the mirror action to include sub-folders and the files within to be included in the mirror operation, otherwise only the files in the base directories will be mirrored.

Mirror date & time

Mirror Empty Directories

Enabling this option allows directories that are empty on the source end to be recreated in the destination, by default empty directories are not re-created.

Delete items on server that do not exist locally/Delete local items that do not exist on server

Enable this option if you wish to create an exact mirror where files and directories that exist at your destination that do not exist at your source will be deleted. Use this option with care as it can permanently remove data. For instance mirroring an empty source directory to a non-empty destination with this option enabled would delete all the files and directories in the destination directory.

Log Files Affected

Enable this option to write a list of mirrored files to the log.

Overwrite Behaviour

The Overwrite Behaviour tab provides options to specify whether files that exist in both the source and destination should be overwritten. Without enabling any of these options, existing files will never be overwritten.

Overwrite where CRC Hashes do not match

Enable this option to compare file CRC32 hashes when the file exists in both the source and the destination. If the hash values do not match then the destination file will be replaced with the source file.

This option will only work where the FTP Server being used supports CRC checks for files.

Overwrite where file size is different

Enable this option to compare the file size when the file exists in both the source and the destination. If the size values do not match then the destination file will be replaced with the source file.

Overwrite where source is newer

Enable this option to compare the file date when the file exists in both the source and the destination. If the source file is newer then the destination file will be replaced with the source file.

Skip time skew check

This action automatically calculates the time difference between the FTP Server and the local machine and compensates for this when comparing the file dates.

NOOP behaviour

Keep connection alive with NOOPs

NOOPs interval

Log NOOPs

Include/Exclude Files

The Include/Exclude Files tab allows you to determine which files are included and excluded for the mirror operation.

Include Items

Enabling the Only mirror files with specific extension option allows you to select which files are included/excluded for the mirror operation. This allows you to pass a comma-delimited list of file extensions. This list can only contain file extensions, not file names or wild cards.

The following Include list is valid:

.txt,.xml,.ini

The following Include list is invalid:

MyFile.txt,*.xml,\Settings\*.ini

When using this option only files that match the specified extension(s) will be considered, this means that files with this extension will be mirrored.

Exclude Items

The Exclude Items section allows you to specify items to be excluded from the mirror operation. You can use as many exclusion rules as required. Files can be excluded on the following basis:

File Name

Exclude any files that match the file name specified. This value cannot include any wildcard characters, the value must be the file name and extension of the file that you want to exclude.

Example: Readme.txt - this will exclude any file named Readme.txt

File Mask

Exclude any files that match the file mask specified. This value can contain wildcard characters (i.e. * and ?) to exclude files and directories.

Example: *\Backups\* - this will exclude all files and directories that are within the Backups directory.

Regex - Exclude any files that match the regular expression specified.

Example: Logs[1-7]\.txt - this would exclude the any file named Logs where the number between Logs and .txt is in the range 1-7.

See the Regular Expression reference for more on using regular expressions.

Log Excluded Files

Enable this option to log the list of files that have been excluded based on the exclude list filters.

Exclude list overrides the Include list, so if you set your include filter to only include text files (.txt) and you add an exclude filter to exclude any files called 'Readme.txt' then all files called 'Readme.txt' will be excluded from the mirror operation.

  • No labels