环境
系统:CentOS 7
rsync服务端
-
安装
# yum install rsync
-
编辑主配置文件
# vim /etc/rsyncd.conf uid = root gid = root use chroot = yes read only = no transfer logging = yes log file = /var/log/rsyncd.log secrets file = /etc/rsyncd.secrets [backup] path = /data/backup
-
创建用户密码文件
# vim /etc/rsyncd.secrets rsync_user:rsync_password # chmod 600 /etc/rsyncd.secrets
-
创建模块目录
# mkdir -p /data/backup
rsyn使用
-
本地拷贝
rsync [OPTION]... SRC DEST
-
远程拷贝
rsync [OPTION]... SRC [USER@]host:DEST rsync [OPTION]... [USER@]HOST:SRC DEST
-
使用rsync服务远程拷贝
rsync [OPTION]... [USER@]HOST::SRC DEST rsync [OPTION]... SRC [USER@]HOST::DEST
网友评论