Giter VIP home page Giter VIP logo

bkt's Introduction

bkt - CLI tool to download and upload files from / to s3 compatible storage.

bkt put -f ./ /target-path-in-s3/ -w 10 demo

The example above is pushing images to Linode object storage. Average file size is about 200KB to 350KB. The run finish in 76s.

Installation:

curl -L https://github.com/YJChan/bkt/releases/download/v0.2.4/bkt-linux-amd64 > bkt

mkdir -p ~/bin && mkdir -p $HOME/.bkt/bin && mv ./bkt $HOME/.bkt/bin

chmod +x $HOME/.bkt/bin/bkt

ln -s $HOME/.bkt/bin/bkt ~/bin/bkt

source ~/.profile

Sample screen:

bkt 0.1.0

USAGE:
    bkt [FLAGS] [OPTIONS] <action>

FLAGS:
    -h, --help         Prints help information
    -V, --version      Prints version information
    -v, --verbosity    Pass many times for more log output

OPTIONS:
    -b, --bucket <bucket-name>
            Bucket name, this value will overwrite the bucket name set in config

    -c, --config <config-value> <config-value> <config-value> <config-value> <config-value>
            s3 bucket configuration, sequence as follow:
             access key (s3 access key)
             secret key (s3 secret key)
             bucket (use '-' on bucket if no fix bucket need to define) 
             endpoint (use '-' on endpoint if no endpoint need to configure, default is AWS endpoint) 
             region (use '-' on region if that is s3 compatible services)
    -t, --content-type <content_type>
            Upload file's content type, eg. image/jpeg, application/pdf, etc...

    -d, --destination <destination>
            Location you want to put in s3 bucket

    -f, --folder <folder>
            Recursively upload files in folder to s3 bucket

    -l, --limit <limit>
            Limit number of files to be upload when uploading a folder

    -s, --source <source>
            File you want to upload to s3 bucket


ARGS:
    <action>    allowed arguments are <get> or <put> or <set> or <list-config>

bkt will first need to setup config value in order to put objects to targeted s3 storage

bkt set --config AWSACCESSKEY AWSSECRETKEY image-folder - cn-north-1

bkt put folder to s3 storage

bkt put --folder $(pwd) --destination /target-folder/weekend/images

bkt put single file to s3 storage

bkt put --source ./test.txt --destination /target-folder/weekday/test.txt

bkt put file with 8 threads

bkt put -f $(pwd) -d /target-folder/weekend/images -w 8

Available region arguments

us-east-2
us-west-1
us-west-2
ca-central-1
ap-south-1
ap-northeast-1
ap-northeast-2
ap-northeast-3
ap-southeast-1
ap-southeast-2
cn-north-1
cn-northwest-1
eu-north-1
eu-central-1
eu-west-1
eu-west-2
eu-west-3
me-south-1
sa-east-1
Digital Ocean nyc3
Digital Ocean ams3
Digital Ocean sgp1
Yandex Object Storage
Wasabi us-east-1
Wasabi us-east-2
Wasabi us-west-1
Wasabi eu-central-1

bkt's People

Contributors

yjchan avatar

Watchers

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