GithubHelp home page GithubHelp logo

batcave's Introduction

Batcave

npm

Use AWS S3 as a file backup service.

Installation

npm install -g @discretetom/batcave

Usage

Create a file e.g. backup.yml with the following content:

storage:
  bucket: BUCKET_NAME # s3 bucket name
  prefix: PREFIX/ # s3 key prefix
  profile: default # local aws profile
  region: us-east-1 # region of your s3 bucket
  class: STANDARD # s3 storage class
upload:
  # specify local path and remote path
  # local path can use `~` as the home dir
  # for windows, the home dir is like 'C:/Users/xxx'
  - local: ~/Documents
    remote: Documents
  # you can specify local only
  # then the remote will be the direct folder name
  # in this case, the remote will be `Videos`
  - local: ~/Videos
  # all `\` in local will be replaced to `/`
  # so it's ok to use `\` in local
  - local: ~\Pictures
  # remote path must be unique
  # so the following `remote` will throw an error
  # `Duplicated remote path: Documents`
  - local: /home/ubuntu/doc
    remote: Documents
  # you can use glob filters to filter files
  - local: /home/ubuntu/Musics
    filters:
      - exclude: "*" # use glob expression to exclude files
      - include: "*.mp4" # use include to escape from exclude
# same rules as the upload
# by default, download tasks will be executed after upload tasks
download:
  - local: ~/Documents
filters: # global filters
  - exclude: "**/node_modules"

Then you can use batcave backup.yml to backup your files.

Add the option --dry to displays the operations that would be performed using the specified command without actually running them.

batcave's People

Contributors

discretetom avatar

Stargazers

 avatar

Watchers

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