Mirror job management tool.
Go to file
zyx b2a22a9bbc update editor config 2020-05-25 19:16:53 +08:00
.github/workflows Update tunasync.yml 2020-03-16 22:43:41 +08:00
.vscode update editor config 2020-05-25 19:16:53 +08:00
autocomplete feat(bash and zsh autocompletion for tunasynctl): 2016-08-02 23:31:54 +08:00
cmd remove logger.Error() 2020-03-29 11:54:39 +08:00
docs/zh_CN Update workers.conf 2020-05-23 15:28:32 +08:00
internal bump version to 0.6.2 2020-04-08 20:12:41 +08:00
manager Add LastStarted test case 2020-04-05 01:07:46 -04: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 implement the timeout 2020-05-25 19:15:05 +08:00
.gitignore chore(cmd): added git hash and build date to version 2016-06-15 14:58:27 +08:00
.testpackages.txt feature(worker): framework of mirror provider 2016-04-30 16:38:17 +08:00
LICENSE Initial commit 2014-10-17 16:24:26 +08:00
Makefile Bye Travis! 2020-03-13 17:24:57 +08:00
README.md Bye Travis! 2020-03-13 17:24:57 +08:00
go.mod Support nested mirror config 2020-03-29 00:24:58 +08:00
go.sum Support nested mirror config 2020-03-29 00:24:58 +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  +--+->| pre-exec +--->|  job run  +--->|  post-exec  +-+-->| post-success |
+-----------+  ^  +----------+    +-----------+    +-------------+ |   +--------------+
               |                                                   |
               |                +-----------------+                | Failed
               +----------------+    post-fail    |<---------------+
                                +-----------------+

Building

Go version: 1.13

make all

Binaries in the build/.