<Rsync 대상 서버 설정>
# vi /etc/xinetd.d/rsync
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
# vi /etc/rsyncd.conf ===> 없으면 생성
[kwkim] ===> rsync에서 사용할 alias name
path=/home/... ===> 동기화 되는 절대 경로
comment=kwkim ===> 주석
uid=root
gid=root
use chroot=yes
read only=yes
hosts allow=***.***.***.*** ===> 접속 허용할 IP
max connections=1 ===> 최대 접속자 수
timeout=300 ===> Idle 타임 아웃(초)
# /etc/rc.d/init.d/xinetd restart ===> 슈퍼데몬으로 동작 할 경우
# rsync --daemon ===> 데몬으로 동작 할경우
# ps -aux | grep rsync
root 507 0.0 0.0 5196 768 pts/3 S+ 17:17 0:00 grep rsync
root 4145 0.0 0.0 5352 456 ? Ss Jan20 0:00 rsync --daemon
- rsync는 포트 873으로 동작하기 때문에 확인
# netstat -natp | grep 873
tcp 0 0 0.0.0.0:873 0.0.0.0:* LISTEN ****/rsync
tcp 0 0 :::873 :::* LISTEN ****/rsync
<Rsync 받을 서버 설정>
- 대상 서버와 마찬가지로 Rsync가 설치 되어 있어야 하며 873포트도 열려 있어야 함
# crontab -e
*/5 * * * 0 rsync -avzr [백업 받을 서버 IP]::[alias name] [저장할 절대 경로] >> [rsync작동 로그 저장경로] ===> 5분마다 작동
# service crond restart
# vi /etc/xinetd.d/rsync
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
# vi /etc/rsyncd.conf ===> 없으면 생성
[kwkim] ===> rsync에서 사용할 alias name
path=/home/... ===> 동기화 되는 절대 경로
comment=kwkim ===> 주석
uid=root
gid=root
use chroot=yes
read only=yes
hosts allow=***.***.***.*** ===> 접속 허용할 IP
max connections=1 ===> 최대 접속자 수
timeout=300 ===> Idle 타임 아웃(초)
# /etc/rc.d/init.d/xinetd restart ===> 슈퍼데몬으로 동작 할 경우
# rsync --daemon ===> 데몬으로 동작 할경우
# ps -aux | grep rsync
root 507 0.0 0.0 5196 768 pts/3 S+ 17:17 0:00 grep rsync
root 4145 0.0 0.0 5352 456 ? Ss Jan20 0:00 rsync --daemon
- rsync는 포트 873으로 동작하기 때문에 확인
# netstat -natp | grep 873
tcp 0 0 0.0.0.0:873 0.0.0.0:* LISTEN ****/rsync
tcp 0 0 :::873 :::* LISTEN ****/rsync
<Rsync 받을 서버 설정>
- 대상 서버와 마찬가지로 Rsync가 설치 되어 있어야 하며 873포트도 열려 있어야 함
# crontab -e
*/5 * * * 0 rsync -avzr [백업 받을 서버 IP]::[alias name] [저장할 절대 경로] >> [rsync작동 로그 저장경로] ===> 5분마다 작동
# service crond restart
'Linux security' 카테고리의 다른 글
httpd: Could not reliably determine the server's fully qualifie... (0) | 2011.01.28 |
---|---|
rsync 스케줄링 백업 받기 (0) | 2011.01.21 |
Linux CRON daemon 설정 (0) | 2011.01.18 |