tuna/tunasync

unexpected end of filter rule: risk

canghaiwuhen opened this issue · 7 comments

默认配置报错
rsync -aHvh --no-o --no-g --stats --filter risk .tmp/ --exclude .tmp/ --delete --delete-after --delay-updates --safe-links --timeout=120 --delete-excluded rsync://mirrors.tuna.tsinghua.edu.cn/qt/ /opt/mirrors/web/qt
unexpected end of filter rule: risk
rsync error: syntax or usage error (code 1) at exclude.c(1011) [client=3.1.2]

phy25 commented

您的运行操作系统和 rsync 版本是?

请提供完整的配置文件,和 tunasync worker 的标准错误输出,以及相应 mirror 任务的日志。

您的运行操作系统和 rsync 版本是?

ubuntu 20.04
rsync version 3.1.2 protocol version 31

请提供完整的配置文件,和 tunasync worker 的标准错误输出,以及相应 mirror 任务的日志。

[global]
name = "qt_worker"
log_dir = "/opt/mirrors/tunasync/log/tunasync/{{.Name}}"
mirror_dir = "/opt/mirrors/web"
concurrent = 10
interval = 1

[manager]
api_base = "http://localhost:12345"
token = ""
ca_cert = ""

[cgroup]
enable = false
base_path = "/sys/fs/cgroup"
group = "tunasync"

[server]
hostname = "localhost"
listen_addr = "127.0.0.1"
listen_port = 6007
ssl_cert = ""
ssl_key = ""

[[mirrors]]
name = "qt"
interval = 720
rsync_timeout = 120
retry = 10
provider = "rsync"
upstream = "rsync://mirrors.tuna.tsinghua.edu.cn/qt/"
rsync_options = [ "--delete-excluded" ] # delete .tmp folders
memory_limit = "256M"

请提供完整的配置文件,和 tunasync worker 的标准错误输出,以及相应 mirror 任务的日志。

[21-12-15 23:03:19][NOTICE] start syncing: qt
[21-12-16 11:43:17][NOTICE] start syncing: qt
[21-12-16 11:51:51][NOTICE] start syncing: qt
[21-12-16 11:52:59][NOTICE] start syncing: qt
[21-12-16 11:55:44][NOTICE] start syncing: qt
[21-12-16 12:52:07][NOTICE] start syncing: qt

一直同步不动
手动执行rsync指令去掉risk,可以同步完成

/opt/mirrors/tunasync/log/tunasync/qt 下的 log 请提供一下。

tunasync worker

手动执行 rsync 的时候要把 risk ~.tmp~/ 连在一起作为 filter 和 exclude 的参数...

- --filter risk .~tmp~/
+ --filter "risk .~tmp~/"