sersync2 | Tianlin

sersync [args] [conf.file]
args:
-r 在监控目录之前先把目录文件推送一遍
-d 以后台daemon的方式运行
-o 指定[conf.file]

使用unit的前提是先手动执行一遍同步操作sersync2 -ro confxml.xml,后面unit不可能一直带着-r参数(感觉也不是不可以看实际情况,因为加了-r的话每次重启服务都是一次全量备份)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# cat > /usr/lib/systemd/system/sersync.service <<END
# /usr/lib/systemd/system/sersync.service
# author: linjiangyu
# cc: https://creativecommons.org/licenses/by-nc-sa/4.0/
[Unit]
Description=sersync unit by linjiangyu
Documentation=https://linjiangyu.com/sersync
After=network-online.target remote-fs.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/local/sersync/sersync2 -o /usr/local/sersync/confxml.xml
ExecReload=/bin/kill -s HUP
ExecStop=/bin/kill -s TERM

[Install]
WantedBy=multi-user.target
END
avatar
🐟认真摸鱼中
Tianlin
风有约 花不误
Hearken
公告栏
--- 主域名 ---
linjiangyu.com 🍧
--- 私人云盘 ---
alist.linjiangyu.com📮
--- 备用域名 ---
fleek.linjiangyu.com🍰
netlify.linjiangyu.com🍨
cloudflare.linjiangyu.com🍬
微博热搜
空降评论复制本文地址
随便逛逛昼夜切换关于博客美化设置切换全屏打印页面