우선 rsync는 우분투에 기본으로 설치되어 있으나, rsync 서버는 disable되어 있다.
1. /etc/rsyncd.conf 파일을 생성하고 아래와 같이 입력한다.
[superkkt]
path = /data/backup/superkkt
comment = Superkkt's Backup Storage
read only = false
uid = superkkt
gid = superkkt
hosts allow = 111.111.111.111
path = /data/backup/superkkt
comment = Superkkt's Backup Storage
read only = false
uid = superkkt
gid = superkkt
hosts allow = 111.111.111.111
이 설정은 [superkkt]라는 네임스페이스를 정의하는데, read-write가 가능하며, 서버의 superkkt라는 uid/gid를 사용하고, 111.111.111.111 IP에서 오는 요청만 처리한다는 설정이다.
2. /etc/default/rsync 파일을 열고 아래 부분을 찾아서 false를 true로 바꿔준다.
RSYNC_ENABLE=true
3. rsync 데몬을 실행한다.
# sudo /etc/init.d/rsync restart
이제 서버 설정은 다 끝났고, 클라이언트에서는 아래와 같이 백업을 시작할 수 있다.
# rsync -avz /backup-source-directory server-ip::superkkt

comments
comments rss (+댓글 쓰러가기)