Mirror job management tool.
Go to file
zyx 96f11f57ed throw an error if executing reload command without worker id 2019-04-09 22:30:08 +08:00
autocomplete feat(bash and zsh autocompletion for tunasynctl): 2016-08-02 23:31:54 +08:00
cmd throw an error if executing reload command without worker id 2019-04-09 22:30:08 +08:00
docs/zh_CN Update tips.md 2019-04-07 21:48:57 +08:00
internal regenerate travis deploy key 2018-10-25 17:27:32 +08:00
manager increse test coverage 2018-10-25 17:02:05 +08:00
systemd feature(worker): limit rsync memory using cgroup 2016-05-08 17:24:41 +08:00
tests feature(worker): implemented multi-file configrations. closing #23 2016-05-03 16:52:38 +08:00
worker add tests for last commit 2019-03-31 12:16:45 +08:00
.gitignore chore(cmd): added git hash and build date to version 2016-06-15 14:58:27 +08:00
.testandcover.bash ci(tunasync): upload to github releases 2016-11-20 00:51:20 +08:00
.testpackages.txt feature(worker): framework of mirror provider 2016-04-30 16:38:17 +08:00
.travis.yml regenerate travis deploy key 2018-10-25 17:27:32 +08:00
LICENSE Initial commit 2014-10-17 16:24:26 +08:00
Makefile ci(tunasync): upload to github releases 2016-11-20 00:51:20 +08:00
README.md remove section of certificate generation 2019-04-06 10:56:38 +08:00
package.json chore(git): Made this repo commitizen frendly 2016-05-05 11:45:51 +08:00

tunasync

Build Status Coverage Status Commitizen friendly GPLv3

Get Started

Download

Pre-built binary for Linux x86_64 is available at Github releases.

Design

# Architecture

- Manager: Central instance for status and job management
- Worker: Runs mirror jobs

+------------+ +---+                  +---+
| Client API | |   |    Job Status    |   |    +----------+     +----------+ 
+------------+ |   +----------------->|   |--->|  mirror  +---->|  mirror  | 
+------------+ |   |                  | w |    |  config  |     | provider | 
| Worker API | | H |                  | o |    +----------+     +----+-----+ 
+------------+ | T |   Job Control    | r |                          |       
+------------+ | T +----------------->| k |       +------------+     |       
| Job/Status | | P |   Start/Stop/... | e |       | mirror job |<----+       
| Management | | S |                  | r |       +------^-----+             
+------------+ |   |   Update Status  |   |    +---------+---------+         
+------------+ |   <------------------+   |    |     Scheduler     |
|   BoltDB   | |   |                  |   |    +-------------------+
+------------+ +---+                  +---+


# Job Run Process


PreSyncing           Syncing                               Success
+-----------+     +-----------+    +-------------+     +--------------+
|  pre-job  +--+->|  job run  +--->|  post-exec  +-+-->| post-success |
+-----------+  ^  +-----------+    +-------------+ |   +--------------+
			   |                                   |
			   |      +-----------------+          | Failed
			   +------+    post-fail    |<---------+
			          +-----------------+

Building

Setup GOPATH like this.

Then:

go get -d github.com/tuna/tunasync/cmd/tunasync
cd $GOPATH/src/github.com/tuna/tunasync
make

If you have multiple GOPATHs, replace the $GOPATH with your first one.