Coder Social home page Coder Social logo

dmreiland / sftp-fetch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simplefinance/sftp-fetch

0.0 2.0 0.0 110 KB

Download new files from an SFTP server and publish them to a queue, using S3 to hold the data

Home Page: https://github.com/SimpleFinance/sftp-fetch

License: Other

Java 100.00%

sftp-fetch's Introduction

sftp-fetch

Download new files from an SFTP server and publish them to a queue, using S3 to hold the data.

Configuration

First, create a properties file that looks like

sftp.hostname=<the.sftp.hostname>
sftp.username=<the.sftp.username>
sftp.password=<the.sftp.password>
sftp.folder=<the.sftp.folder.to.download.from>

rabbit.hostname=<the.rabbit.hostname>
rabbit.port=5672
rabbit.username=<the.rabbit.username>
rabbit.password=<the.rabbit.password>
rabbit.vhost=<the.rabbit.vhost>
rabbit.exchange=<the.rabbit.exchange>

s3.bucket=<s3.bucket>
fetch.days=<number.of.days.to.fetch>

Usage

The Basics

Once you have created the appropriate config files you can invoke

java -jar sftp-fetch.jar -c </path/to/properties/file> -n

This will show you what files it would process without actually doing it. Run without -n to actually process. Files that have already been processed will be skipped unless you run with --overwrite

Files that match a pattern

Optionally you can restrict operations only to files that match a certain pattern using -p

java -jar sftp-fetch.jar -c </path/to/properties/file> -r <routingkey> -p '.*SomeFileName.*'

Specify the routing key

You can specify a routing key using --routing-key at the command line or rabbit.routingkey in the property file.

GPG decryption

If you are fetching GPG encrypted files from SFTP you can optionally have sft-fetch decrypt them by supplying the path to the GPG private key in the property file using

decryption.key.path=</path/to/pgp/private/key>

Currently encrypted private keys are not supported.

sftp-fetch's People

Contributors

cosmin avatar

Watchers

Dan Reiland avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.