Format name | This is a unique name identifier for the format you are creating. This will be used to identify the FTP format in the Server list format field of the previous options page. |
List command | This is the command that will generate a file listing on the remote FTP server. Usually, this is 'LIST' |
Ignore line if ... | DataArmour can get confused if it tries to parse a line that does not adhere to the list expression. Examples are lines like 'total number of files 2317' etc. You can tell the parser to ignore lines starting with certain letters. Enter all of the letters you wish to ignore in this edit box. NOTE: DataArmour looks only at the first character of each line. So if you wanted to ignore any lines starting with any of a, r, t, u or w you would enter 'artuw' into this edit box. The comparission is case sensitive, so 'artuw' is not the same as 'ARTUW'. |
Use File size in comparisons | Select this option if you wish DataArmour to use the file size of any existing destination file in its comparison. The comparison is used to establish if the destination file is older than the source for a backup (this saves time when performing successive backups, as not all files need to be copied to the destination) |
Use Date/time in comparisons | As above, this option enables DataArmour to compare a destination file against the source by means of last modified date and time. |
Supports SITE CHMOD | Typically a UNIX based FTP command which changes the permissions on a file. Not all servers support this command. If your server does, DataArmour will be able to copy the file permissions from your system to the files stored on the FTP server (e.g.: Read only files of your system will be marked as read only on the FTP server) |
Skip line if it fails parsing | Usefull if your FTP server returns banners before the directory listings. Banners will usually cause the parser to fail, and since banners are simply text files - it is impossible to add options to allow you to skip them. The 'solution' is to let DataArmour skip any lines that fail parsing. Using this option could cause you grief if a backup really does fail in this case, nothing will be reported in the log. Leaving this option blank will cause a failed line to stop the backup. If you are going to use this option, you should perform a FULL test of the ftp server by clicking on Full test. |
DataArmour parses each line it recives from the FTP server using the expression above. The expression tells DataArmour how the line is organised. DataArmour uses a token generator to split the line into 'tokens'. (A token is a series of characters which are usually separated by spaces, colons etc).
The First List Entry field shows how the results of a directory listing from the server are interpreted using the list expression above. The results are broken down into date, time, size and filename components.
Here is an example of a List Entry and its tokens.
-rwxr-xr-x 1 swf322 users 1499 Aug 9 19:30 filename.doc
This line would be split into the following tokens.
Token 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
Ident | Num | Ident | Ident | Num | Ident | Num | Num | Char | Num | Ident | Char | Ident |
-rwxr-xr-x | 1 | swf322 | users | 1499 | Aug | 9 | 19 | : | 30 | filename | . | doc |
-rwxr-xr-x 1 swf322 users 1499 Aug 9 19:30 filename.doc
Attributes
Specifies that the next token will be the files attributes. If the next token is a '<', then DA will assume that a DOS style directory/size follows. Otherwise, DA will try to assemble a unix style directory specification (like the one in the example above). It is from this information that DA can tell whether or not a line from the list represents a file or a directory.
Size
Specifies that the next token in the input is the file size. This token must be numeric or an error will be generated.
Date Day/Month/Year
Specifies that the tokens following make up a date. You can specify the day/month/year operators in any order. To parse June 20 1998 you would write an expression date month day year. You can also place skip and skipsym operators in between any of the month/day/year operators.
Note re year: If the number for the year must be greater than 50 for the parser to recognise it. Also, if the
number for the year is less than 100, 1900 is added to create the final year.Examples:
Parser sees Year as calculated by parser 98 1998 105 105 2000 2000 40 <number not used>
Time (12/24) Hour/Minute/Second [ampm]
The keyword time, followed by either 12 or 24 indicates which mode of clock to expect. 12 expects a 12hr clock (3:30am / 3:30pm) and 24 expects a 24hr clock (03:30 / 15:30). The hour/minute/second operators work the same way as they do in date - simply put them in the order in which the data appears from the FTP server. If the chosen time mode is 12, then TIME may contain the ampm operator, to indicate where the am/pm symbol is located in the input.
Any one (or all) of hour, minute or second can be left out of the expression. If any term is not included, then the current default is used. i.e: If the current date (when the parser runs) is 1 Jan 1998, 12:05:00pm, and you specify the time part of the expression as:
time 12 hour skipSym : minute
The timestamp of the file will be <file hour>:<file minute>:00. Where the 00 comes from the current date time (as mentioned above). The same happens if you leave out any of hour or minute. The missing value is simply replaced by the relevant component of the current time. A warning: Doing this obviously makes the time returned by the parser incorrect - and as such, the FTP format editor will automatically disable the time option for file comparisions.
To parse a time like: 12:30:50pm write:
time 12 hour skipSym : minute skipSym : second ampm
Filename [ForceDos]
Specifies the next token as the name of the file. If DOSNAME is specified then it interprets the name as an 8.3 filename. If DOSNAME is not specified then the filename can be any combination of characters and includes every character up to the end of the line.
Skip
Skips the next token in the input stream, regardless of what it is
SkipSym Symbol
Skips the next token in the input stream, only if the token matches the one you supply.
e.g: skipSym : would skip a colon if it exists in the input stream.
-rwxr-xr-x 1 swf322 users 1499 Aug 9 19:30 filename.doc
Using the same example as above, the commands would be
attributes skip skip skip
size
date month day year
time 24 hour skipsym : minute skipsym : second
filename
This would assign the first token to attributes, skip the next three tokens, the third is the files size, fourth and fifth tokens (perhaps even sixth) are date related, sixth, sevent and eighth is hours, minutes and seconds (of time stamp) respectively. Colons are skipped if present in between time fields/tokens. The remaining part of the line is assumed to be the filename.
The list output screen shows the complete file listing which was returned from the FTP server. The fields are fixed width and cannot be adjusted, so you may need to resize the DataArmour window to see the full screen.
You may select any item in the list above by clicking on it with the left mouse button. This will then higlight the item and place the selected line into the First List Entry field on the Format Editor Tab.
The FTP Server Output shows a complete listing of all input and output from the FTP server. This screen enables you to view all commands sent to the FTP server and all messages returned form it. This will enable you to effectively debug any problems that you may.
This screen shows you the results of a full parse using the list expression you have created.