Coder Social home page Coder Social logo

s3-upload's Introduction

s3-upload

Script to upload logs or any other files to Amazon Busket. It will upload 1 per day and remove the old logs based in the variable: MONTH_TO_KEEP.

Options you can use in the script:

python upload.py (will update the day before (yesterday). No overwrite file. Delete old files)
python upload.py full_update (will update all the files. No overwrite file. Not delete old files)
python upload.py full_update overwrite (will update all the files. Yes overwrite files. Not delete old files)
python upload.py manual 2012-01-27 (will update the date file. No overwrite file. Not delete old files)
python upload.py manual 2012-01-27 overwrite (will update the date file. Yes overwrite file. Not delete old files)
python upload.py manual 2012-01 overwrite (will update all month. Yes overwrite file. Not delete old files)
python upload.py manual 2012-01 (will update all month. No overwrite file. Not delete old files)
  • Pid function
  • Check MD5 when upload file
  • Print the stdout to a log
  • Delete the log from the date marked in MONTH_TO_KEEP
  • Upload bar when the files are uploading manualy

get-s3-file

Download logs or files from S3

Usage: python get_s3_file.py [options]

Options:

  -f ..., --log=...       Name of the log to download
  -D ..., --datelog=...   Date to thelog to donwload
  -l, --list              List all lthe content on the storage
  -h, --help              Show this help
  -s, size                Show total size of the bucket
  -d                      Show debugging information while parsing (disable)

Examples:

python get_s3_file.py --list
python get_s3_file.py -f example-of-name.log -D 2011-03-29

This script requires the boto module and dateutil for Python to be installed. For example: apt-get install python-boto python-dateutil

s3-upload's People

Contributors

amiasnikov avatar

Watchers

James Cloos avatar Jose de Soto 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.