rsync同步指定文件

定時任務

*/5 * * * * cd /home/ops/prometheus-2.3.0.linux-amd64/;rsync -artz -R --delete --timeout=180 ./ --include="prometheus.yml" --exclude="*" [email protected]::vmagent --password-file=/etc/rsyncd.passwd
[root@sf-01 vmagent]# cat /etc/rsyncd.conf 
uid = root
gid = root
use chroot = no
max connections = 200
timeout = 300
strict modes = false
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log

[vmagent]
path = /home/ops/victoria-metrics/vmagent/
ignore errors
read only=no
write only=no
hosts allow = *
hosts deny = 127.0.0.1
auth users = vmagent
secrets file = /etc/rsync.password
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章