暫無描述

Chen 26ceb49c2b Merge pull request #212 from tuna/dependabot/go_modules/golang.org/x/net-0.38.0 1 月之前
.github 436386fb73 ci: include git tag in release tarball 6 月之前
.umlrootfs b372744640 update ci script 2 年之前
.vscode b2a22a9bbc update editor config 5 年之前
autocomplete 83fc766147 feat(bash and zsh autocompletion for tunasynctl): 9 年之前
cmd d2b3e731bf Fix numerous lint issues 6 月之前
docs bca49abd3c doc: increase default interval 2 年之前
internal 528b799bc4 Bump to v0.9.3 6 月之前
manager 95c4d54ee2 Replace boltdb with bbolt, fix #173, close #174 8 月之前
systemd 28c8145137 feature(worker): limit rsync memory using cgroup 9 年之前
tests ef32197fef Run go fmt 8 月之前
worker a5b72b8c55 Add tests for success_exit_codes in config and provider 6 月之前
.gitignore 559f5705f6 ci: rename all coverage files to .gcov, ignore them in git 8 月之前
.testpackages.txt 44af0d5e62 feature(worker): framework of mirror provider 9 年之前
LICENSE 78f3501e19 Initial commit 11 年之前
Makefile 559f5705f6 ci: rename all coverage files to .gcov, ignore them in git 8 月之前
README.md a6a03decf0 doc: update README and bump to v0.9.0 8 月之前
go.mod 51e5cbf746 build(deps): bump golang.org/x/net from 0.35.0 to 0.38.0 5 月之前
go.sum 51e5cbf746 build(deps): bump golang.org/x/net from 0.35.0 to 0.38.0 5 月之前
package.json c311648546 chore(git): Made this repo commitizen frendly 9 年之前

README.md

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/.