Table of Contents |
---|
Introduction
This is the fourth in a series of articles describing how to get started with using the the JADE Client via its Command Line Interface.
...
- Getting Started and Downloading files
- Simple File Selection
- More Advanced File Selection
- File Transfer
- Checking Files for Completeness
- Public / Private Key Authentication
For setting-up and running the examples see Using the tutorials with the JADE Client Command Line Interface
Checking files for completeness
A number of methods for checking whether file transfer has been completed are presented in this document:
...
If more than one file is to be transferred then the use of the transaction parameter is recommended (TBD - LINK)
File Completeness - MD5 Hash Checksums
Example a) - Create and transfer an MD5 checksum file
JADE can write a file's MD5 checksum into a file which it gives the ending .MD5. This file can then be transferred along with the 'original' file.
...
Code Block | ||
---|---|---|
| ||
jade.cmd -settings="%USERPROFILE%\jade_demo\jade_settings.ini" -profile="local_2_local_create_md5" |
Behavior
If you have already run some of the previous examples, you will have a series of files in the a folder on your computer, sequentially named test_1.txt through to test_5.txt.
...
The next example shows the use of the MD5 file to verify the transferred files.
Example b) - Checking a transferred file against a transferred MD5 checksum file
After you have run the Create and transfer an MD5 checksum file example above you will have a series of files in your target folder together with corresponding .MD5 files.
...
Code Block | ||
---|---|---|
| ||
jade.cmd -settings="%USERPROFILE%\jade_demo\jade_settings.ini" -profile="local_2_local_check_md5" |
Behavior
First the 'original' and then the MD5 files will be copied to the b\checked sub-folder.
...
The transferred files will not be deleted from the target directory - in this case the checked directory.
File Completeness - Atomic File Transfer
Example - Atomic File Transfer
The principle of atomic file transfer was described at the beginning of this article.
...
Code Block | ||
---|---|---|
| ||
jade.cmd -settings="%USERPROFILE%\jade_demo\jade_settings.ini" -profile="sftp_server_2_local_atomic" |
Behavior - Atomic File Transfer
When atomic file transfer is specified JADE will add the characters specified in the atomic_prefix and atomic_suffix parameters to the file name. Once the file transfer has been completed, JADE deletes the prefix and suffix.
...
Code Block | ||
---|---|---|
| ||
20218 [main] INFO com.sos.VirtualFileSystem.DataElements.SOSFileListEntry - SOSVfs_I_0108: transfer of /test_large_1.txt started 25943 [main] INFO com.sos.VirtualFileSystem.DataElements.SOSFileListEntry - SOSVfs_I_274: The security hash (MD5) of the test_large_1.txt file is 40f38a5f677aa387a057677e6d78aaa6 25949 [main] INFO com.sos.VirtualFileSystem.local.SOSVfsLocalFile - SOSVfs_I_150: File 'C:\temp\jade_demo\a\~test_large_1.txt~' renamed to 'C:\temp\jade_demo\a/test_large_1.txt'. |
File Completeness - Check Steady State
Example - Check Steady State of incoming files
The local_2_local_check_steady_state profile listed below is intended to be used in JADE together with a second file transfer program that allows the file transfer rate to be restricted. This second file transfer program is used to transfer a large file from our test server to the a folder used in previous examples at a relatively slow rate. In parallel, JADE is used to check the size of the file arriving in the a folder. When a steady state is found, the file will be transferred to the local folder b.
...
Code Block | ||
---|---|---|
| ||
jade.cmd -settings="%USERPROFILE%\jade_demo\jade_settings.ini" -profile="local_2_local_check_steady_state" |
Behavior - Check Steady State of incoming files
Once JADE starts executing the profile the command line interface will show a series of messages containing the following:
...