Mirror job management tool.
Go to file
Shengqi Chen c01de06ac3
Bump to v0.9.2
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
2025-02-27 22:22:06 +08:00
.github/workflows ci: use go 1.23 2025-02-27 22:15:22 +08:00
.umlrootfs update ci script 2023-04-19 00:53:33 +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 Run go fmt 2025-01-11 16:00:34 +08:00
docs doc: increase default interval 2023-01-18 13:47:02 +08:00
internal Bump to v0.9.2 2025-02-27 22:22:06 +08:00
manager Replace boltdb with bbolt, fix #173, close #174 2025-01-11 16:06:35 +08:00
systemd feature(worker): limit rsync memory using cgroup 2016-05-08 17:24:41 +08:00
tests Run go fmt 2025-01-11 16:00:34 +08:00
worker Implement global.rsync_options (fixes #206) 2025-02-27 17:37:22 +08:00
.gitignore ci: rename all coverage files to .gcov, ignore them in git 2025-01-12 15:51:20 +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 ci: rename all coverage files to .gcov, ignore them in git 2025-01-12 15:51:20 +08:00
README.md doc: update README and bump to v0.9.0 2025-01-11 16:14:44 +08:00
go.mod Run go get -u 2025-02-27 22:13:53 +08:00
go.sum Run go get -u 2025-02-27 22:13:53 +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.22

# for native arch
> make all
# for other arch
> make ARCH=linux-arm64 all

Binaries are in build-$ARCH/, e.g., build-linux-amd64/.