Sen descrición

Shengqi Chen d2b3e731bf Fix numerous lint issues hai 6 meses
.github ece3e3d9e3 ci: use go 1.23 hai 6 meses
.umlrootfs b372744640 update ci script %!s(int64=2) %!d(string=hai) anos
.vscode b2a22a9bbc update editor config %!s(int64=5) %!d(string=hai) anos
autocomplete 83fc766147 feat(bash and zsh autocompletion for tunasynctl): %!s(int64=9) %!d(string=hai) anos
cmd d2b3e731bf Fix numerous lint issues hai 6 meses
docs bca49abd3c doc: increase default interval %!s(int64=2) %!d(string=hai) anos
internal c01de06ac3 Bump to v0.9.2 hai 6 meses
manager 95c4d54ee2 Replace boltdb with bbolt, fix #173, close #174 hai 8 meses
systemd 28c8145137 feature(worker): limit rsync memory using cgroup %!s(int64=9) %!d(string=hai) anos
tests ef32197fef Run go fmt hai 8 meses
worker d2b3e731bf Fix numerous lint issues hai 6 meses
.gitignore 559f5705f6 ci: rename all coverage files to .gcov, ignore them in git hai 8 meses
.testpackages.txt 44af0d5e62 feature(worker): framework of mirror provider %!s(int64=9) %!d(string=hai) anos
LICENSE 78f3501e19 Initial commit %!s(int64=11) %!d(string=hai) anos
Makefile 559f5705f6 ci: rename all coverage files to .gcov, ignore them in git hai 8 meses
README.md a6a03decf0 doc: update README and bump to v0.9.0 hai 8 meses
go.mod d2b3e731bf Fix numerous lint issues hai 6 meses
go.sum 0a00097301 Run go get -u hai 6 meses
package.json c311648546 chore(git): Made this repo commitizen frendly %!s(int64=9) %!d(string=hai) anos

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