A script to automate the syncing of a folder from Amazon S3 to local storage. The script wraps around s4cmd's rsync like functionality and provides logging of synced files. It is designed to be run using crontab and error logging is not built in to the script. Basic logging can be achieved by redirecting stdout to an error log.
S3filesync is a very simple automation script and requires the python application s4cmd.
It is designed to be used in a UNIX like enviroment and has been tested in Ubuntu 14.04 but should work on other Linux distributions, BSD's and OSX. If you are running the script in these enviroments please let me know how you get on!
To install simply clone the repo and edit the variables prefixed cfg_ to your s3 folder, local folder and logging folder.
To sync files run:
python /path/to/s3filesync.py >> /path/to/error.log
To automate add the script to your crontab by typing:
crontab -eand adding the following line replacing the *'s with how regularly you would like to sync from S3
* * * * * /path/to/s3logsync.py >> /path/to/error.log 2>&1