Stores files on a SFTP Server
22
)null
)null
) see below""
)true
)600
)".%03d.%02d"
)file_ext
+ ".tmp" first, then rename it after upload finish (boolean, default: false
)false
, plugin will buffer records to remote file directly, with ".tmp" as filename suffix (boolean, default: true
)5368709120
, ie. 5GiB, min: 50MiB, max: 10GiB)null
)
22
)null
)out:
type: sftp
host: 127.0.0.1
port: 22
user: civitaspo
secret_key_file: /Users/civitaspo/.ssh/id_rsa
secret_key_passphrase: secret_pass
user_directory_is_root: false
timeout: 600
path_prefix: /data/sftp
file_ext: _20151020.tsv
sequence_format: ".%01d%01d"
temp_file_threshold: 10737418240 # 10GiB
With proxy
out:
type: sftp
host: 127.0.0.1
port: 22
user: embulk
secret_key_file: /Users/embulk/.ssh/id_rsa
secret_key_passphrase: secret_pass
user_directory_is_root: false
timeout: 600
path_prefix: /data/sftp
proxy:
type: http
host: proxy_host
port: 8080
user: proxy_user
password: proxy_secret_pass
command:
Please set path of secret_key_file as follows.
out:
type: sftp
...
secret_key_file: /path/to/id_rsa
...
You can also embed contents of secret_key_file at config.yml.
out:
type: sftp
...
secret_key_file:
content |
-----BEGIN RSA PRIVATE KEY-----
ABCDEFG...
HIJKLMN...
OPQRSTU...
-----END RSA PRIVATE KEY-----
...
$ ./gradlew classpath
Use vagrant
to start a remote sshd server:
$ vagrant up
Run:
$ embulk run -Ilib example/sample.yml
$ ./gradlew gem # -t to watch change of files and rebuild continuously
$ ./gradlew bintrayUpload # release embulk-output-sftp to Bintray maven repo
This plugin uses "org.apache.commons:commons-vfs" and the library uses the logger "org.apache.commons.logging.Log". So, this plugin suppress the logger's message except when embulk log level is debug.