Comments (8)
对于大小信息,可以参考
与
tunasync/docs/zh_CN/workers.conf
Line 37 in 02327a1
tunasync 会在日志中自动查找类似模式并设置大小
您也可以通过 tunasynctl set-size
设置大小
from tunasync.
您可以放置一个 dummy 脚本提供给 tunasync,并将其 interval 设置为较大值。在每次手动更新后手动触发 tunasynctl start -w worker target
即可
from tunasync.
十分感谢,这个方案非常实用。
from tunasync.
我编写了如下的假脚本,然而worker提示exec format error
,无法成功同步。
#set -e
echo "Sync done"
echo "Total size is" $(numfmt --to=iec 1228240142)
请问编写worker可识别的脚本需要遵循什么样的format?
from tunasync.
请问编写worker可识别的脚本需要遵循什么样的format?
您好,您需要在脚本中加入 shebang 以使操作系统认识到如何运行该脚本。您可以编写如下脚本
#!/usr/bin/env bash
#set -e
echo "Sync done"
echo "Total size is" $(numfmt --to=iec 1228240142)
并 chmod +x
该脚本
from tunasync.
仍然出了一些问题...
worker --debug:
[22-11-15 22:38:03][NOTICE][worker.go:191] Received command: restart (rosetta)
[22-11-15 22:38:03][NOTICE][job.go:128] start syncing: rosetta
[22-11-15 22:38:03][DEBUG][job.go:136] hooks: pre-job
[22-11-15 22:38:03][DEBUG][loglimit_hook.go:34] executing log limitter for rosetta
[22-11-15 22:38:03][DEBUG][worker.go:448] reporting on manager url: http://localhost:12345/workers/QLU_Mirrors/jobs/rosetta
[22-11-15 22:38:03][DEBUG][runner.go:90] Executing command /home/qlu_mirrors/scripts/rosetta_fake.sh at /mnt/vos-6izqwyw8/mirrors/rosetta
[22-11-15 22:38:03][DEBUG][runner.go:127] Command start: [/home/qlu_mirrors/scripts/rosetta_fake.sh]
[22-11-15 22:38:03][DEBUG][cmd_provider.go:145] set isRunning to true: rosetta
[22-11-15 22:38:03][DEBUG][base_provider.go:168] calling Wait: rosetta
[22-11-15 22:38:03][DEBUG][job.go:169] provider started
[22-11-15 22:38:03][DEBUG][base_provider.go:165] set isRunning to false: rosetta
[22-11-15 22:38:03][DEBUG][job.go:180] syncing done
[22-11-15 22:38:03][WARNIN][job.go:213] failed syncing rosetta: exit status 127
[22-11-15 22:38:03][DEBUG][job.go:215] post-fail hooks
from tunasync.
failed syncing rosetta: exit status 127
手动执行该脚本结果如何?
在 tunasync 日志目录下(例如 /var/log/tunasync/rosetta
)中是否能找到脚本运行的日志?
from tunasync.
我愚蠢的CRLF换行引发了这个问题。现在dummy脚本运行良好,worker的执行符合预期。再次感谢!
from tunasync.
Related Issues (20)
- failed when syncing ubuntu repository HOT 4
- "Generating global index page" too slow when mirroring pypi with tunasync HOT 9
- "Generating global index page" took too long... HOT 22
- 如果不用docker的话很多同步都需要补依赖和脚本什么的 HOT 36
- 使用仓库 debian 示例配置提示 Can't read config file ftpsync-debian.conf! HOT 1
- Loongarch64支持 HOT 3
- 使用代理配置后连接一直403 HOT 6
- 自定义镜像脚本工作异常 HOT 5
- How to update the size manually using tunasynctl HOT 5
- tunasync tool failed to synchronize HOT 2
- 如何排除特定格式的文件或目录 HOT 4
- tunasync worker 同步指定的文件? HOT 5
- 求帮助,truenas-core系统下如何build? HOT 1
- 同步如何排除指定架构 HOT 1
- Worker panics when reloading config, if the old config contains no mirrors
- Adoptium jdk21的镜像没有同步 HOT 1
- 使用command方式同步,如何正确获取同步到的Size?
- 是否需要更换更快的GoWeb框架 HOT 1
- 如何将job日志合并到worker输出中 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tunasync.