Utility to watch directory for changes and move modified files to AWS S3.
usage: s3pusher [-h] [--bucket BUCKET] [--hostname HOSTNAME] [--log-json] [--debug] directory [directory ...]
S3 Pusher
positional arguments:
directory Directory to watch for changes
options:
-h, --help show this help message and exit
--bucket BUCKET S3 bucket name (S3PUSHER_BUCKET environment variable can also be used)
--fields FIELDS Comma separated list of key=value pairs to include in S3 object key (S3PUSHER_FIELDS environment variable can also be used)
--log-json Log in JSON format
--debug Enable debugging
The environment variable S3PUSHER_HOSTNAME may also be used to set field hostname.
Environment variables used for authentication can be found in the Boto3 documentation.
Files will be uploaded to the specified bucket in the following format:
year=YYYY/month=MM/day=DD/hour=HH/minute=MM/second=SS/uuid=UUID/FILENAME
If --fields provider=xyzzy,hostname=host is specified, the format is:
year=YYYY/month=MM/day=DD/hour=HH/minute=MM/second=SS/provider=xyzzy/hostname=host/uuid=UUID/FILENAME