rsync 서버 설정
rsync 패키지 확인
# rpm -qa | grep rsync
rsync-2.6.3-1
xinetd 패키지 확인
# rpm -qa | grep xinetd
xinetd-2.3.13-4.5.el4
rsync를 사용하기 위한 설정 (disable = yes -> disable = no 변경)
# cat /etc/xinetd.d/rsync # default: off # description: The rsync server is a good addition to an ftp server, as it \ # allows crc checksumming etc. service rsync { disable = yes socket_type = stream wait = no user = root server = /usr/bin/rsync server_args = --daemon log_on_failure += USERID } |
방화벽 허용 (port 873)
iptables 에서 rsync Port 873 허용 한다.
# vi /etc/rsyncd.conf
[home] path = /home/scbyun comment = homedirectory backup uid = root #기본 nobody gid = root #기본 nobody use chroot = yes # 보안상 지정한 경로를 최상위(root 디렉토리로 사용)로 설정 read only = yes # 읽기전용 # 읽기 전용 설정. PUT을 지원(클라이언트에서 서버로 업데이트)하기 위해서는 yes로 설정 hosts allow = 192.168.0.12 # 접근 가능한 호스트 max connections = 1 # 동시 접속자 수 timeout 600 # 클라이언트에서 접근 시 타임아웃시간 |
설정 후 xinetd 데몬 재시작
service xinetd restart
/etc/init.d/xinetd restart
rsync 클라이언트 설정
rsync -avz 192.168.0.11::home /home/scbyun_backup/
rsync –avz 도메인(IP) ::서비스명 백업디렉토리
# rsync -avz 192.168.0.11::home /home/scbyun_backup/
receiving file list ... done
created directory /home/scbyun_backup
./
ns3/
ns4/
.bash_history
.bash_logout
.bash_profile
.bashrc
.viminfo
domain.txt.gz
ns3/aa.sh
ns3/adfadf
ns3/domainfilter.sh
ns3/includefile_ns3-1.txt
ns3/includefile_ns3-2.txt
ns3/includefile_ns3.txt
zonetransfer.txt
sent 506 bytes received 339149 bytes 226436.67 bytes/sec
total size is 2885097 speedup is 8.49
#
'리눅스' 카테고리의 다른 글
[리눅스] CentOS6.x VNC 설치 (0) | 2013.06.18 |
---|---|
history 명령어 실행 시간 보기(history HISTTIMEFORMAT) (0) | 2013.06.18 |
[리눅스] 리눅스 환경에서 rsync 명령어로 데이터 동기화하는 방법 (1) | 2013.06.18 |
scp 명령어 (2) | 2013.06.18 |
Webalizer를 컴파일하고 설치하는 방법 (0) | 2013.06.17 |