[go: up one dir, main page]

Skip to content

Receive compressed data from sftp server and extract gz file

License

Notifications You must be signed in to change notification settings

erdemkm/sftp-receiver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sftp-receiver

Receive compressed data from sftp server and extract gz file.

if you wish delete file from sftp server after recevied data or specify a time frame, you can customize using script arguments. Also, you can forward data to splunk using inputs configuration and delete it to save space after sending.

Installation and Configuration

Firstly, create a virtual environment and install requirements as the following;

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Parameters in config.py file must be filled as required. If you want to use cron, run.sh script can added to crontab like below;

crontab -e
*/5 * * * * /opt/sftp-receiver/run.sh

Usage

<usage: sftpReceiver.py [-h] [-d] [-tf TIMEFRAME] [-t]

optional arguments:
  -h, --help            show this help message and exit
  -d, --delete          Delete file from sftp server after received
  -tf TIMEFRAME, --timeframe TIMEFRAME
                        Timeframe in minutes for files to download
  -t, --tryagain        Retry for can't downloaded files before

About

Receive compressed data from sftp server and extract gz file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published