Mirror job management tool.
Go to file
Zenithal bca49abd3c doc: increase default interval
Ref to https://github.com/tuna/issues/issues/1649
2023-01-18 13:47:02 +08:00
.github/workflows ci: minor fixes 2021-08-02 17:50:30 +08:00
.umlrootfs CI: add tests in cgroupv2 2021-07-27 22:32:12 +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 Fix incomplete usage on tunasynctl set-size 2022-12-12 00:14:05 +08:00
docs doc: increase default interval 2023-01-18 13:47:02 +08:00
internal Merge branch 'cgroupv2', and bump version to v0.8.0 2021-09-02 22:22:26 +08:00
manager Fix wrong usage of val in leveldb backend 2020-10-22 20:12:01 +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 Merge branch 'cgroupv2', and bump version to v0.8.0 2021-09-02 22:22:26 +08:00
.gitignore Add support for multiarch builds 2020-09-11 17:59:33 +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 cgroupv2: add tests on cgv1 for implicit cgroup 2021-07-27 00:36:40 +08:00
README.md Improve docs (#138) 2020-09-17 12:43:01 +08:00
go.mod Merge branch 'cgroupv2', and bump version to v0.8.0 2021-09-02 22:22:26 +08:00
go.sum Merge branch 'cgroupv2', and bump version to v0.8.0 2021-09-02 22:22:26 +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 and ARM64 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-linux-amd64/.