GithubHelp home page GithubHelp logo

qiniu-autosync's Introduction

qiniu-autosync

Sync files to Qiniu Cloud Storage automaticly with inotify-tools

此脚本可监控 Linux/Unix 上指定的文件夹,并将此文件夹内的新增或改动文件自动同步到七牛云存储,可设定同步删除。

安装

  1. 需先安装 inotify-tools - https://github.com/rvoicilas/inotify-tools/wiki
  2. 然后下载 qboxrsctl - http://docs.qiniutek.com/v3/tools/qboxrsctl/
  3. 下载脚本 qiniu-autosync.sh
curl -fsSkL https://raw.github.com/why404/qiniu-autosync/master/qiniu-autosync.sh -o qiniu-autosync.sh
chmod +x ./qiniu-autosync.sh

使用

获取七牛云存储 ACCESS_KEY 和 SECRET_KEY 以及 BUCKET_NAME (空间名称) 请登录:https://dev.qiniutek.com

用法(反斜杠用于排版换行需要,实际情况下可忽略):

./qiniu-autosync.sh -a /PATH/TO/appkey.json \     # appkey.json 写明 {"access_key":"YOUR_ACCESS_KEY", "secret_key": "YOUR_SECRET_KEY"}
                    -b BUCKET_NAME \              # 用于存储文件的七牛空间名称
                    -c /PATH/TO/qboxrsctl \       # qboxrsctl 可执行命令所在路径
                    -d /PATH/TO/WATCH_DIR \       # 要监控的目录,绝对路径
                    -e ALLOW_DELETE_TrueOrFalse \ # 是否允许自动删除,缺省为 false
                    -f FILE_BLOCK_SIZE \          # 文件切片分块大小,超过这个大小启用并行断点续上传,缺省为 4194304 (4MB)
                    -g INOTIFY_IGNORE_PATTERN     # 忽略列表(正则),缺省为 "^(.+(\~|\.sw.?)|4913)$" (即 vim 临时文件)

qiniu-autosync's People

Contributors

why404 avatar xushiwei avatar

Stargazers

yann avatar Arcoon avatar Timesking avatar  avatar

Watchers

 avatar James Cloos avatar Qiniu Cloud avatar Landy avatar  avatar

Forkers

zhang0137

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.