标签:txt word systemd sts 密码文件 lock file 全局 nbsp bsp
[root@ localhost ~]# vim /etc/rsyncd.conf #全局配置 uid = root gid = root use chroot = no max connections = 200 timeout = 300 pid file = /var/run/rsyncd.pid lock file = /var/run/rsync.lock log file = /var/log/rsyncd.log ###模块配置 [backup] path = /data ignore errors read only = false list = false hosts allow = 10.0.0.0/24 hosts deny = 0.0.0.0/32 auth users = rsync_backup secrets file = /etc/rsync.password
[root@ localhost ~]# mkdir -p /data [root@ localhost ~]# useradd rsync -s /sbin/nologin -M [root@ localhost ~]# chown -R rsync.rsync /data/
[root@ localhost ~]# echo "rsync_backup:123456" >/etc/rsync.password [root@ localhost ~]# chmod 600 /etc/rsync.password
[root@ localhost ~]# systemctl start rsyncd.service [root@ localhost ~]# systemctl restart rsyncd.service [root@ localhost ~]# systemctl enable rsyncd.service Created symlink from /etc/systemd/system/multi-user.target.wants/rsyncd.service to /usr/lib/systemd/system/rsyncd.service.
[root@ localhost ~]# echo "123456">/etc/rsync.password [root@ localhost ~]# chmod 600 /etc/rsync.password
[root@ localhost ~]# rsync -avz aaa.txt rsync_backup@10.0.0.49::backup --password-file=/etc/rsync.password sending incremental file list aaa.txt sent 70 bytes received 27 bytes 194.00 bytes/sec total size is 2 speedup is 0.02
标签:txt word systemd sts 密码文件 lock file 全局 nbsp bsp
原文地址:https://www.cnblogs.com/gaiting/p/12307757.html