| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
11年前发布

一个开源的Dropbox:Quilter

将一个文件目录映射到 CouchDB/Cloudant 数据库中。这是说,它是一个开源的Dropbox。

安装

sudo npm install -g quilter  quilt sync --local {folder} --remote {url} --watch

That's it! Quilter will watch files on the remote database and in the local folder, and will sync any changes that occur. To save that command for the future, use --save:

quilt sync --local {folder} --remote {url} --watch --save  quilt # runs all saved jobs

命令

  • pull: pull files from remote into local
  • push: push files from local up to remote
  • sync: push and pull files from and to local and remote
  • (default): run all saved jobs
  • jobs: list all saved jobs

可选项

  • --local: a local folder, like ~/Pictures.
  • --remote: a remote database, like a CouchDB or Cloudant instance.
  • --save: save the given command for later re-use.
  • --watch: continue watching and reacting to changes indefinitely.
  • --config: path to a non-default file to use for saving and reading configuration values.
  • --log: indicates level for logging. Choose from error, warn, info, verbose, debug, and silly.

Quilting on Startup

N.B. These instructions are for *nix systems, like Linux and Mac OS X

Using forever and cron, you can set Quilter to run on a regular basis. Like this:

sudo npm install -g forever  echo '@reboot' `which node` `which forever` '--minUptime 1' `which quilt` '--log info' | crontab

That'll run all saved jobs whenever your computer starts. If Quilter fails, forever will restart it.

配置

By default, jobs are saved to ~/.quilt.json. It's just JSON, so you can edit it as you please. If it becomes invalid JSON, Quilter will get angry. Here's an example config file:

[    {       command: 'pull',      local: 'testbutt',      remote: 'http://localhost:5984/eggchair'    }   ]

测试

The tests sync data with a live CouchDB instance running at http://localhost:5984. So, to run the tests, make sure you have an instance listening at that URL.

To run the tests, do npm test.

项目主页:http://www.open-open.com/lib/view/home/1391822793145

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1391822793145.html
Quilter 存储系统 分布式/云计算/大数据