Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Please look at http://www.sos-berlin.com/doc/en/jade/JADE%20Parameter%20Reference.pdf Parameter Reference Documentation for an overview about all of the available JADE parameters.
Example: transfer from WebDAV server to local file system
First we make create some global profiles for file transfer from a WebDAV to local transfer.host to a localhost:
Code Block | ||
---|---|---|
| ||
[local_target_host]
target_protocol = local
target_dir = /tmp/test/jade/in
[webdav_source_host]
source_protocol = webdav
source_host = http://homer.sos/jade
source_port = 80
source_user = test
source_password = 12345
source_ssh_auth_method = url
[copy_webdav2local]
include = webdav_source_host,local_target_host
operation = copy
|
The profile copy_webdav2local will be included in further profiles.
Anchor | ||||
---|---|---|---|---|
|
In the file_path option you can enter add a list of source filesfile names.
If the option source_dir is empty then these
files must havefile names have to be specified with absolute paths from the viewpoint of the WebDAV server (e.g. DocumentRoot setting in
apacheApache).
- If the option source_dir is not empty then these files must have paths relative file names have to be specified with relative paths to the source_dir directory.
The _ The source_dir_ directory must have an absolute path from the viewpoint of the WebDAV server directory has to be specified with an absolute path from the viewpoint of the WebDAV server (e.g. DocumentRoot setting in apacheApache).No Format
In this example
...
there are two files with the same name
...
in different source directories: /jade/out/1.txt and /jade/out2/1.txt
...
After the transfer they are there is only one file /tmp/test/jade/in/1.txt in the target directory.
This is a special situation but and a good example to discuss the different difference in behaviour depending on the options overwrite_files (default: true
) and append_files (default: false
).
Here we have three profiles:
Code Block | ||
---|---|---|
| ||
[filepath_append] include = copy_webdav2local file_path = /jade/out/1.txt;/jade/out2/1.txt append_files = true [filepath_no_overwrite] include = copy_webdav2local file_path = /jade/out/1.txt;/jade/out2/1.txt overwrite_files = false [filepath_overwrite] include = copy_webdav2local file_path = /jade/out/1.txt;/jade/out2/1.txt |
- In the first example filepath_append the target file has the content of both source files.
The second transfer of /jade/out2/1.txt appends the already existing target file /tmp/test/jade/in/1.txt which was created after the first transfer of /jade/out/1.txt. - In the second example filepath_no_overwrite the target file has the content of the first source files (/jade/out/1.txt).
The second transfer of /jade/out2/1.txt is skipped because /tmp/test/jade/in/1.txt already exists after the first transfer of /jade/out/1.txt. - In the third example filepath_overwrite the target file has the content of the second source files (/jade/out2/1.txt).
The second transfer of /jade/out2/1.txt overwrites the target file /tmp/test/jade/in/1.txt from the first transfer of /jade/out/1.txt.
You can also setuse
Code Block | ||
---|---|---|
| ||
file_path = 1.txt;../out2/1.txt
source_dir = /jade/out/
|
or
Code Block | ||
---|---|---|
| ||
file_path = out/1.txt;out2/1.txt
source_dir = /jade/
|
instead of the above setting
Code Block | ||
---|---|---|
| ||
file_path = /jade/out/1.txt;/jade/out2/1.txt
|
Anchor | ||||
---|---|---|---|---|
|
The file_spec option expects a regular expression to select files from the directory which that is set specified by the source_dir option.In
- By the following first profile filespec
...
- all files with names ending in .txt. will be transferred from the directory /jade/out to /tmp/test/jade/in
...
- By
...
- the second profile recursive the recursive option (default:
false
) is used to transfer all files with names ending in .txt from subdirectories of source_dir
...
Code Block | ||
---|---|---|
| ||
[filespec]
include = copy_webdav2local
source_dir = /jade/out
file_spec = \.txt$
[recursive]
include = copy_webdav2local
source_dir = /jade/out
file_spec = \.txt$
recursive = true
|
Example with file_spec behind a
...
proxy
First we make create a global profiles profile for the proxy parameter.:
Code Block |
---|
[webdav_source_proxy]
source_proxy_host = proxy.sos
source_proxy_port = 3128
#source_proxy_user =
#source_proxy_password =
|
The profile webdav_source_proxy will be included in above file_spec profile:
Code Block |
---|
[filespec_with_proxy]
include = copy_webdav2local,webdav_source_proxy
source_dir = /jade/out
file_spec = \.txt$
|
and so you have receive the above example with file_spec example with with proxy support.
Example: transfer from local file system to WebDAV server
First we make create some global profiles for local file transfer from the localhost to a WebDAV transfer.server:
Code Block | ||
---|---|---|
| ||
[local_source_host]
source_protocol = local
[webdav_target_host]
target_protocol = webdav
target_host = http://homer.sos/jade
target_port = 80
target_user = test
target_password = 12345
target_ssh_auth_method = url
target_dir = /jade/in
[copy_local2webdav]
include = webdav_target_host,local_source_host
operation = copy
|
The profile copy_local2webdav will be included in further profiles.
Please note that the target_dir has to be an specified as absolute path from the viewpoint of the WebDAV server (e.g. DocumentRoot setting in apacheApache).
The target_dir is not relative to the location in which WebDAV is supportedoperated.
Example with file_path
These This example are is similar to the above example with file path example in the WebDAV -> local chapter but in the other direction._path for transfer from WebDAV host to localhost, however, the direction has changed.
Code Block | ||
---|---|---|
| ||
Code Block | ||
[filepath]
include = copy_local2webdav
file_path = /tmp/test/jade/in/1.txt
|
<span style="color:red">The The append_files parameter doesn't work currently.</span> is reported not to have worked for some releases. Using this parameter prevents /tmp/test/jade/out2/1.txt overwrites from overwriting /tmp/test/jade/out/1.txt in as by the following profiles profile:
Code Block | ||
---|---|---|
| ||
[filepath_append]
include = copy_local2webdav
file_path = /tmp/test/jade/out/1.txt;/tmp/test/jade/out2/1.txt
append_files = true
|
Example with file_spec
These examples are similar to above the above example with file spec example in the WebDAV -> local chapter but in the other direction.In the following _spec, however, directions have changed.
- By the first profile filespec transfers
...
- are effected for files with names ending in .txt from /tmp/test/jade/out to /jade/in
...
- By
...
- the second profile recursive the recursive option (default:
false
) is used to transfer
...
- files with names ending in .txt from subdirectories of source_dir
...
Code Block |
---|
[filespec]
include = copy_local2webdav
source_dir = /tmp/test/jade/out
file_spec = \.txt$
[recursive]
include = copy_local2webdav
source_dir = /tmp/test/jade/out
file_spec = \.txt$
recursive = true
|
Example with file_spec behind a
...
proxy
First we make create a global profiles profile for the proxy parameter.:
Code Block |
---|
[webdav_target_proxy]
target_proxy_host = proxy.sos
target_proxy_port = 3128
#target_proxy_user =
#target_proxy_password =
|
The profile webdav_target_proxy will be included in above file_spec profile:
Code Block |
---|
[filespec_with_proxy]
include = copy_local2webdav,webdav_target_proxy
source_dir = /tmp/test/jade/out
file_spec = \.txt$
|
and so you have as a result you receive the above example with file_spec example with proxy with proxy support.