Scope
- The XML Editor can export an XML configuration as used for YADE 1.11 to a compatible .ini format as used for YADE 1.10 and earlier.
- The following samples examples have been created by use of the JADE - XML Configuration - XML Editor
- Each sample file references the XSD
scheme JADE
Examples
All examples are used for JADE Configuration XSD schema http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.xsd
Simple File Transfer Operations
- Each sample is available in compatible .xml and .ini formats for your reference.
- The samples are based on configuration examples as explained in the YADE - Tutorials.
Prerequisites
The XML Editor feature for exporting compatible configuration files makes use of a Java based Plugin.
- Use of this feature requires a Java Run-Time Environment starting from version 1.8 to be available.
Configuring the XML Editor
Activating the YADE Xml2Ini Converter Plugin
The XML Editor comes with a sub-folder plugins
in the installation directory.
- By default all Plugins that are deployed with this folder are available with the XML Editor. Therefore the Xml2Ini Converter is active by default.
- Should the sub-folder
plugins
not be available, e.g. should this folder have been renamed, then you cannot use the conversion feature. - If the Xml2Ini Converter is available then you can use the respective operation from the main menu and from the tab context menu.
- The XML Editor shows a file dialog and suggests an .ini export file with the same basename as the current .xml configuration file.
Configuring the XML Editor for automated Conversion
The XML Editor comes with the feature to auto-save configuration files in the .ini format when saving to the .xml format, i.e. doing the conversion automatically.
- To activate this feature adjust the check-box "Autosave ini file" to be checked. We recommend to use this feature if you want to create compatible .xml and .ini configuration files for YADE releases 1.10 and 1.11.
- This allows to manage configurations for YADE 1.11 in XML format and to have a parallel .ini file being created for use with YADE 1.10. Keeping both .xml and .ini configuration files in sync will allow a smooth migration to YADE 1.11 - as long as you would not manually modify the .ini file.
- In autosave mode the .ini file will be overwritten whenever the .xml file is saved.
- In addition you can enable desktop notifications to be created if a .ini file is being saved.
Image Added
Assigning the YADE XSD Schema
When creating a new XML configuration file then the following dialog appears for schema assignment:
Image Added
For YADE configuration files please assign the XSD Schema that matches your YADE release:
- either assign the XSD schema from the SOS Web Site: http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd
- or download the XSD schema to some local location and assign it by using the Open File dialog.
The schema will be accessed by the XML Editor when validating, saving and converting files. The following operations for schema assignment for existing files are available from the tab context menu:
- Reload schema: reload and apply the current XSD schema.
- Reassign schema: open the assignment dialog and assign an XSD schema.
Examples
- All examples are used for the YADE Configuration XSD schema http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd
- All examples are compatible for use with YADE 1.10 (.ini) and YADE 1.11 (.xml)
Getting Started
Code Block |
---|
language | xml |
---|
title | XML Configuration File: getting_started.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<FTPFragment name="ftp_server_2_local"> |
Code Block |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.work.xsd">
<Fragments>
<ProtocolFragments>
<FTPFragment name="ftp_test">
<BasicAuthentication>
<Account><![CDATA[demo]]></Account>
<Password><![CDATA[demo]]></Password>
</BasicAuthentication>
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port><![CDATA[21]]></Port>
</BasicConnection>
</FTPFragment>
<SFTPFragment name="sftp_test">
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port><![CDATA[22]]></Port>
</BasicConnection>
<SSHAuthentication>
<Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
<Password><![CDATA[demo]]></Password>
</AuthenticationMethodPassword>
</SSHAuthentication>
</SFTPFragment>
<SFTPFragment name="sftp_test_key">
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port><![CDATA[22]]></Port>
</BasicConnection>
<SSHAuthentication>
<Account><![CDATA[demo]]></Account>
<AuthenticationMethodPublickey>
<AuthenticationFile><![CDATA[${USERPROFILE}\jade_demo\demo_id_rsa]]></AuthenticationFile>
</AuthenticationMethodPublickey>
</SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="ftp_server_2_local">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<FTPFragmentRef ref="ftp_test" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[.*]]></FileSpec>
<BasicConnection>
<Directory><<Hostname><![CDATA[/test.sos-berlin.com]]></Directory>Hostname>
<Port>21</Port>
</FileSpecSelection>BasicConnection>
<BasicAuthentication>
</Selection> <Account><![CDATA[demo]]></Account>
<Password><![CDATA[demo]]></Password>
</SourceFileOptions>BasicAuthentication>
<<PassiveMode>true</CopySource>PassiveMode>
</FTPFragment>
<CopyTarget>
<SFTPFragment name="sftp_server_2_local_pass">
<CopyTargetFragmentRef><BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<LocalTarget />
<Port>22</Port>
</CopyTargetFragmentRef>BasicConnection>
<SSHAuthentication>
<Directory>< <Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
<Password><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>Password>
</CopyTarget>AuthenticationMethodPassword>
</Copy>SSHAuthentication>
</Operation>SFTPFragment>
</ProtocolFragments>
</Profile>Fragments>
<Profiles>
<Profile profile_id="sftpftp_server_2_local_pass">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<SFTPFragmentRef<FTPFragmentRef ref="sftp_testftp_server_2_local" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[.*]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</CopyTarget> <TargetFileOptions>
</Copy>
<<DisableOverwriteFiles>false</Operation>DisableOverwriteFiles>
</Profile>
<Profile profile_id="sftp_server_2_local_select_recursive">
</TargetFileOptions>
<Operation>
<Copy></CopyTarget>
<CopySource><TransferOptions>
<CopySourceFragmentRef><Transactional>true</Transactional>
</TransferOptions>
<SFTPFragmentRef ref="sftp_test" </>Copy>
</Operation>
</CopySourceFragmentRef>Profile>
<Profile profile_id="sftp_server_2_local_pass">
<SourceFileOptions><Operation>
<Copy>
<Selection>
<CopySource>
<FileSpecSelection><CopySourceFragmentRef>
<FileSpec><![CDATA[^test_.\.txt$]]></FileSpec><SFTPFragmentRef ref="sftp_server_2_local_pass" />
</CopySourceFragmentRef>
<Directory><![CDATA[/rec]]></Directory>
<SourceFileOptions>
<Recursive><![CDATA[true]]></Recursive><Selection>
</FileSpecSelection><FileSpecSelection>
</Selection>
<FileSpec><![CDATA[.*]]></FileSpec>
</SourceFileOptions>
</CopySource><Directory><![CDATA[/]]></Directory>
<CopyTarget>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</CopyTarget>
<TargetFileOptions>
</Copy> <DisableOverwriteFiles>true</DisableOverwriteFiles>
</Operation>TargetFileOptions>
</Profile>CopyTarget>
<Profile profile_id="sftp_server_2_local_zero_byte">
<Operation><TransferOptions>
<Copy>
<CopySource><Transactional>true</Transactional>
<CopySourceFragmentRef></TransferOptions>
<SFTPFragmentRef ref="sftp_test" />
</Copy>
</CopySourceFragmentRef>Operation>
<SourceFileOptions>
<Selection>
</Profile>
</Profiles>
</Configurations> |
- Flat File Configuration: getting_started.ini
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: getting_started.ini |
---|
collapse | true |
---|
|
[protocol_fragment_ftp@ftp_server_2_local]
protocol <FileSpecSelection>
= ftp
host <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
= test.sos-berlin.com
port </FileSpecSelection>
</Selection>
= <Directives>21
user <TransferZeroByteFiles><![CDATA[relaxed]]></TransferZeroByteFiles>
= </Directives>demo
password </SourceFileOptions>
</CopySource>
= demo
passive_mode <CopyTarget>
<CopyTargetFragmentRef>
= true
[protocol_fragment_sftp@sftp_server_2_local_pass]
protocol <LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= sftp
host </CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_poll_minfiles">
= test.sos-berlin.com
port <Operation>
<Copy>
<CopySource>
= <CopySourceFragmentRef>22
user <SFTPFragmentRef ref="sftp_test" />
</CopySourceFragmentRef>
= demo
ssh_auth_method <SourceFileOptions>
<Selection>= password
password <FileSpecSelection>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
= demo
[profile@ftp_server_2_local]
operation <Directory><![CDATA[/]]></Directory>
= copy
source_include </FileSpecSelection>
</Selection>
= protocol_fragment_ftp@ftp_server_2_local
file_spec <Polling>
<PollInterval><![CDATA[20]]></PollInterval>
= .*
source_dir <PollTimeout><![CDATA[1]]></PollTimeout>
= /
target_protocol <MinFiles><![CDATA[3]]></MinFiles>
<KeepConnection><![CDATA[true]]></KeepConnection>
= local
target_host </Polling>
= </SourceFileOptions>
localhost
target_dir </CopySource>
<CopyTarget>
= ${USERPROFILE}\jade_demo\a
overwrite_files <CopyTargetFragmentRef>
<LocalTarget= />true
transactional </CopyTargetFragmentRef>
= <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
true
[profile@sftp_server_2_local_pass]
operation </CopyTarget>
</Copy>
</Operation>
= </Profile>
copy
source_include <Profile profile_id="replace_local_datestamp">
<Operation>
<Copy>
= protocol_fragment_sftp@sftp_server_2_local_pass
file_spec <CopySource>
<CopySourceFragmentRef>
= .*
source_dir <LocalSource />
</CopySourceFragmentRef>
= <SourceFileOptions>
/
target_protocol <Selection>
= local
target_host <FileSpecSelection>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
= localhost
target_dir = <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
overwrite_files </FileSpecSelection>
</Selection>
= false
transactional </SourceFileOptions>
</CopySource>
= true |
Simple File Selection
Code Block |
---|
language | xml |
---|
title | XML Configuration: simple_file_selection.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments> <CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget>
<SFTPFragment name="sftp_test">
<Rename><BasicConnection>
<ReplaceWhat><<Hostname><![CDATA[^(test)(_)[0-9]\.txttest.sos-berlin.com]]></ReplaceWhat>Hostname>
<ReplaceWith><<Port><![CDATA[file_;[date:yyyy-MM-dd]_22]]></ReplaceWith>Port>
</BasicConnection>
</Rename><SSHAuthentication>
</LocalTarget><Account><![CDATA[demo]]></Account>
</CopyTargetFragmentRef><AuthenticationMethodPassword>
<Directory><<Password><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>Password>
</CopyTarget>AuthenticationMethodPassword>
</Copy>SSHAuthentication>
</Operation>SFTPFragment>
</ProtocolFragments>
</Profile>Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_cumulateselect_recursive">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_test" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
<Directory><![CDATA[/rec]]></Directory>
<Recursive><![CDATA[true]]></Recursive>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<TargetFileOptions></CopyTarget>
</Copy>
<CumulateFiles></Operation>
</Profile>
</Profiles>
</Configurations> |
- Flat File Configuration: simple_file_selection.ini
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: simple_file_selection.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_select_recursive]
protocol <CumulativeFileSeparator><![CDATA[--- File: %{SourceFileName} ---]]></CumulativeFileSeparator>
= <CumulativeFilename><![CDATA[text-files.txt]]></CumulativeFilename>
sftp
host <CumulativeFileDelete><![CDATA[true]]></CumulativeFileDelete>
</CumulateFiles>
= test.sos-berlin.com
port </TargetFileOptions>
</CopyTarget>
</Copy>
= </Operation>22
user </Profile>
<Profile profile_id="local_2_local_create_md5">
<Operation>
<Copy>
= <CopySource>demo
ssh_auth_method <CopySourceFragmentRef>
= password
password <LocalSource />
</CopySourceFragmentRef>
<SourceFileOptions>
= demo
[protocol_fragment_sftp@sftp_server_2_local_zero_byte]
protocol <Selection>
= <FileSpecSelection>sftp
host <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
= test.sos-berlin.com
port <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</FileSpecSelection>
= </Selection>22
user </SourceFileOptions>
</CopySource>
= <CopyTarget>demo
ssh_auth_method <CopyTargetFragmentRef>
= password
password <LocalTarget />
</CopyTargetFragmentRef>
= <Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
demo
[profile@sftp_server_2_local_select_recursive]
operation <TargetFileOptions>
<CreateIntegrityHashFile><![CDATA[true]]></CreateIntegrityHashFile>
</TargetFileOptions>
= copy
source_include </CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="local= protocol_fragment_sftp@sftp_server_2_local_checkselect_md5">
recursive
file_spec <Operation>
<Copy>
<CopySource>
= ^test_.\.txt$
source_dir <CopySourceFragmentRef>
<LocalSource= />rec
recursive </CopySourceFragmentRef>
= <SourceFileOptions>true
target_protocol <Selection>
= local
target_host <FileSpecSelection>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
= localhost
target_dir = <Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
a
overwrite_files </FileSpecSelection>
= false
[profile@sftp_server_2_local_zero_byte]
operation </Selection>
</SourceFileOptions>
= copy
source_include </CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
= protocol_fragment_sftp@sftp_server_2_local_zero_byte
file_spec <LocalTarget />
</CopyTargetFragmentRef>
= ^test_[0-9]\.txt$
source_dir <Directory><![CDATA[${USERPROFILE}\jade_demo\b\checked]]></Directory>
= <TargetFileOptions>
/
zero_byte_transfer <CheckIntegrityHash />
= relaxed
target_protocol </TargetFileOptions>
= </CopyTarget>
local
target_host </Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_atomic">
= localhost
target_dir <Operation>
<Copy>
<CopySource>
= ${USERPROFILE}\jade_demo\a |
More Advanced File Selection
Code Block |
---|
language | xml |
---|
title | XML Configuration: more_advanced_file_selection.xml |
---|
collapse | true |
---|
|
<?xml <CopySourceFragmentRef>version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<SFTPFragmentRef ref<SFTPFragment name="sftp_test" /server_2_local_poll_minfiles">
</CopySourceFragmentRef><BasicConnection>
<SourceFileOptions><Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Selection><Port>22</Port>
</BasicConnection>
<FileSpecSelection><SSHAuthentication>
<FileSpec><<Account><![CDATA[^test_large_1\.txt$demo]]></FileSpec>Account>
<AuthenticationMethodPassword>
<Directory><<Password><![CDATA[/large/demo]]></Directory>Password>
</FileSpecSelection>AuthenticationMethodPassword>
</SSHAuthentication>
</Selection>SFTPFragment>
</SourceFileOptions>ProtocolFragments>
</CopySource>Fragments>
<Profiles>
<CopyTarget><Profile profile_id="sftp_server_2_local_poll_minfiles">
<Operation>
<Copy>
<CopyTargetFragmentRef> <CopySource>
<CopySourceFragmentRef>
<LocalTarget />
<SFTPFragmentRef </CopyTargetFragmentRef>ref="sftp_server_2_local_poll_minfiles" />
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory></CopySourceFragmentRef>
<TargetFileOptions><SourceFileOptions>
<Atomicity><Selection>
<AtomicPrefix><![CDATA[~]]></AtomicPrefix>
<FileSpecSelection>
<AtomicSuffix><<FileSpec><![CDATA[~^test_[0-9]\.txt$]]></AtomicSuffix>FileSpec>
</Atomicity>
<Directory><![CDATA[/]]></Directory>
</TargetFileOptions>
</CopyTarget>FileSpecSelection>
</Copy>
</Operation>Selection>
</Profile>
<Profile profile_id="local_2_local_check_steady_state">
<Polling>
<Operation>
<Copy>
<PollInterval>20</PollInterval>
<CopySource>
<CopySourceFragmentRef><PollTimeout>1</PollTimeout>
<LocalSource <MinFiles>5</>MinFiles>
</CopySourceFragmentRef> <PollingServer>false</PollingServer>
<SourceFileOptions>
<PollForever>false</PollForever>
<Selection>
</Polling>
</SourceFileOptions>
<FileSpecSelection>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec> <LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</FileSpecSelection>CopyTarget>
</Copy>
</Selection>Operation>
</Profile>
</Profiles>
</Configurations> |
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: more_advanced_file_selection.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_poll_minfiles]
protocol <CheckSteadyState>
<CheckSteadyStateInterval><![CDATA[2]]></CheckSteadyStateInterval>
= sftp
host <CheckSteadyStateCount><![CDATA[10]]></CheckSteadyStateCount>
</CheckSteadyState>
</SourceFileOptions>
= test.sos-berlin.com
port </CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
= 22
user <LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
= demo
ssh_auth_method <TargetFileOptions />
= password
password </CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp= demo
[profile@sftp_server_2_local_key">
_poll_minfiles]
operation <Operation>
<Copy>
<CopySource>
= copy
source_include <CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_test_key" />
= protocol_fragment_sftp@sftp_server_2_local_poll_minfiles
file_spec </CopySourceFragmentRef>
<SourceFileOptions>
= ^test_[0-9]\.txt$
source_dir <Selection>
= /
poll_interval <FileSpecSelection>
<FileSpec><![CDATA[^test\.txt$]]></FileSpec>
= 20
poll_timeout <Directory><![CDATA[/]]></Directory>
= 1
poll_minfiles </FileSpecSelection>
= </Selection>
5
polling_server </SourceFileOptions>
= </CopySource>
false
polling_server_poll_forever = <CopyTarget>false
target_protocol <CopyTargetFragmentRef>
= local
target_host <LocalTarget />
</CopyTargetFragmentRef>
= localhost
target_dir <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</CopyTarget>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
Getting Started
= ${USERPROFILE}\jade_demo\a |
File Transfer
Code Block |
---|
language | xml |
---|
title | XML Configuration: file_transfer.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations>
<Fragments>
<ProtocolFragments>
<FTPFragment<SFTPFragment name="ftp_testsftp_server_2_local_cumulate">
<BasicAuthentication><BasicConnection>
<Account><<Hostname><![CDATA[demotest.sos-berlin.com]]></Account>Hostname>
<Password><![CDATA[demo]]></Password><Port>22</Port>
</BasicAuthentication>BasicConnection>
<BasicConnection><SSHAuthentication>
<Hostname><<Account><![CDATA[test.sos-berlin.comdemo]]></Hostname>
Account>
<AuthenticationMethodPassword>
<Port><<Password><![CDATA[21demo]]></Port>/Password>
</AuthenticationMethodPassword>
</BasicConnection>SSHAuthentication>
</FTPFragment>SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="ftpreplace_serverlocal_2_localdatestamp">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<FTPFragmentRef ref="ftp_test" /><LocalSource>
</CopySourceFragmentRef>
<Rename>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[.*<ReplaceWhat><![CDATA[^(test)(_)[0-9]\.txt]]></FileSpec>ReplaceWhat>
<Directory><<ReplaceWith><![CDATA[/[file_;[date:yyyy-MM-dd]_]]></Directory>ReplaceWith>
</FileSpecSelection>Rename>
</Selection>LocalSource>
</SourceFileOptions>CopySourceFragmentRef>
</CopySource>
<SourceFileOptions>
<CopyTarget> <Selection>
<CopyTargetFragmentRef>
<FileSpecSelection>
<LocalTarget />
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</CopyTarget>FileSpecSelection>
</Copy>
Selection>
</Operation>SourceFileOptions>
</Profile>
</Profiles>
</Configurations> |
Simple File Selection
CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
</CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_cumulate">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_server_2_local_cumulate" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<TargetFileOptions>
<CumulateFiles>
<CumulativeFileSeparator><![CDATA[--- File: %{SourceFileName} ---]]></CumulativeFileSeparator>
<CumulativeFilename><![CDATA[text-files.txt]]></CumulativeFilename>
</CumulateFiles>
</TargetFileOptions>
</CopyTarget>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
- Flat File Configuration: file_transfer.ini
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: file_transfer.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_cumulate]
protocol = sftp
host = test.sos-berlin.com
port = 22
user = demo
ssh_auth_method = password
password = demo
[profile@replace_local_datestamp]
operation = copy
source_protocol = local
source_host = localhost
replacing = ^(test)(_)[0-9]\.txt
replacement = file_;[date:yyyy-MM-dd]_
file_spec = ^test_[0-9]\.txt$
source_dir = ${USERPROFILE}\jade_demo\a
target_protocol = local
target_host = localhost
target_dir = ${USERPROFILE}\jade_demo\b
[profile@sftp_server_2_local_cumulate]
operation = copy
source_include = protocol_fragment_sftp@sftp_server_2_local_cumulate
file_spec = ^test_.\.txt$
source_dir = /
target_protocol = local
target_host = localhost
target_dir = ${USERPROFILE}\jade_demo\a
cumulate_files = true
cumulative_file_separator = --- File: %{SourceFileName} ---
cumulative_file_name = text-files.txt |
Checking Files for Completenss
Code Block |
---|
language | xml |
---|
title | XML Configuration: checking_files_for_completeness.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<SFTPFragment name="sftp_server_2_local_atomic">
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port>22</Port>
</BasicConnection>
<SSHAuthentication>
<Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
<Password><![CDATA[demo]]></Password>
</AuthenticationMethodPassword>
</SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="local_2_local_create_md5">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<LocalSource />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
<TargetFileOptions>
<CheckIntegrityHash>
<CreateIntegrityHashFile>true</CreateIntegrityHashFile>
</CheckIntegrityHash>
</TargetFileOptions>
</CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="local_2_local_check_md5">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<LocalSource />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
<TargetFileOptions>
<CheckIntegrityHash />
</TargetFileOptions>
</CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_atomic">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_server_2_local_atomic" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec>
<Directory><![CDATA[/large/]]></Directory>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<TargetFileOptions>
<Atomicity>
<AtomicPrefix><![CDATA[~]]></AtomicPrefix>
<AtomicSuffix><![CDATA[~]]></AtomicSuffix>
</Atomicity>
</TargetFileOptions>
</CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="local_2_local_check_steady_state">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<LocalSource />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</FileSpecSelection>
</Selection>
<CheckSteadyState>
<CheckSteadyStateInterval>2</CheckSteadyStateInterval>
<CheckSteadyStateCount>10</CheckSteadyStateCount>
</CheckSteadyState>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
</CopyTarget>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: checking_files_for_completeness.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_atomic]
protocol = sftp
host = test.sos-berlin.com
port = 22
user = demo
ssh_auth_method = password
password = demo
[profile@local_2_local_create_md5]
operation = copy
source_protocol = local
source_host = localhost
file_spec = ^test_[0-9]\.txt$
source_dir = ${USERPROFILE}\jade_demo\a
target_protocol = local
target_host = localhost
target_dir = ${USERPROFILE}\jade_demo\b
check_security_hash = true
create_security_hash_file = true
[profile@local_2_local_check_md5]
operation = copy
source_protocol = local
source_host = localhost
file_spec = ^test_[0-9]\.txt$
source_dir = ${USERPROFILE}\jade_demo\a
target_protocol = local
target_host = localhost
target_dir = ${USERPROFILE}\jade_demo\b
check_security_hash = true
[profile@sftp_server_2_local_atomic]
operation = copy
source_include = protocol_fragment_sftp@sftp_server_2_local_atomic
file_spec = ^test_large_1\.txt$
source_dir = /large/
target_protocol = local
target_host = localhost
target_dir = ${USERPROFILE}\jade_demo\a
atomic_prefix = ~
atomic_suffix = ~
[profile@local_2_local_check_steady_state]
operation = copy
source_protocol = local
source_host = localhost
file_spec = ^test_large_1\.txt$
source_dir = ${USERPROFILE}\jade_demo\a
check_steady_state_of_files = true
check_steady_state_interval = 2
steady_state_count = 10
target_protocol = local
target_host = localhost
target_dir = ${USERPROFILE}\jade_demo\b |
...