티스토리 뷰

Linux

CentOS7 - rsync 3.1.2

CHOMAN 2019. 6. 17. 15:16

Xinetd 데몬과 연동해서 하던 rsync 가 Cent7에서는 좀 바뀐듯 함

설치

yum install rsync

rsync 서버 설정 (Centos7)

vim /etc/rsyncd.conf (설정파일)

 uid = notify
 gid = notify
 use chroot = yes
 max connections = 20
 pid file = /var/run/rsyncd.pid
 log file = /var/log/rsyncd.log
 transfer logging = yes
 timeout = 45
 hosts allow = 192.168.10.0/24
 read only = no

  [test]
        path = /home/test

rsync 데몬 실행

systemctl enable rsyncd.service
systemctl start rsyncd.service

방화벽 설정

firewall-cmd --permanent --zone=public --add-service=rsyncd
firewall-cmd --reload

클라이언트 설정 (Centos6)

중요한것은 어느 위치에서든지 원본이 먼저 명시되고 복사받는쪽이 뒤에 명시해야 함
--delete 옵션 하기전에 충분히 동기화 테스팅이 필요

동기화 하기 (명령어)

rsync -avvz --delete /var/log/mysql_slow.log 서버아이피::test

/etc/crontab (주기적으로 동기화)

*/01 * * * * root rsync -avvz --delete /var/log/mysql_slow.log 서버아이피::test

Centos6 rsnyc 3.0 --> Centos7 rsnyc 3.1 으로 테스팅 했는데 잘된다

'Linux' 카테고리의 다른 글

mysql 5.0 -> mysql 5.1 새로 생긴 변수들  (0) 2019.06.25
centos7 hostname  (0) 2019.06.20
ntp pool project  (0) 2019.06.05
ntp (time.google.com)  (0) 2019.05.28
nginx conf 설정  (0) 2019.05.17
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함