Rsync Replication: 두 판 사이의 차이

Ubuntu Korea Community Wiki
둘러보기로 이동 검색으로 이동
imported>Drake
imported>Drake
 
(같은 사용자의 중간 판 3개는 보이지 않습니다)
10번째 줄: 10번째 줄:
== 서버 설정 ==
== 서버 설정 ==
* 설정파일 /etc/rsyncd.conf를 다음과 같이 작성한다.
* 설정파일 /etc/rsyncd.conf를 다음과 같이 작성한다.
<source lang="c">
<source lang="bash">
max connections = 2
max connections = 2
log file = /var/log/rsync.log
log file = /var/log/rsync.log
22번째 줄: 22번째 줄:
gid = ubuntu
gid = ubuntu
use chroot = yes
use chroot = yes
</source>
* 설정파일 /etc/default/rsync을 다음과 같이 편집한다.
<source lang="bash">
RSYNC_ENABLE=true
</source>
* 구축이 되었다. rsync를 재시동하자.
<source lang="bash">
sudo /etc/init.d/rsync restart
</source>
== 클라이언트 설정 ==
<source lang="bash">
rsync -avz 192.168.0.4::share ./
</source>
</source>

2015년 4월 19일 (일) 14:40 기준 최신판

Rsync란?[편집]

  • 동기화에 최적화되어 있는 프로그램.
  • 서버는 복사할 소스를 가지고 있고, 클라이언트는 서버로부터 뽑아온다는 내용으로 가정한다.

사전준비[편집]

  • 프로그램 설치

<source lang="bash"> sudo apt-get install -y rsync </source>

  • tcp 873 포트가 열려있는지 확인한다.

서버 설정[편집]

  • 설정파일 /etc/rsyncd.conf를 다음과 같이 작성한다.

<source lang="bash"> max connections = 2 log file = /var/log/rsync.log timeout = 300

[share] comment = Ubuntu home path = /home/ubuntu read only = yes uid = ubuntu gid = ubuntu use chroot = yes </source>

  • 설정파일 /etc/default/rsync을 다음과 같이 편집한다.

<source lang="bash"> RSYNC_ENABLE=true </source>

  • 구축이 되었다. rsync를 재시동하자.

<source lang="bash"> sudo /etc/init.d/rsync restart </source>

클라이언트 설정[편집]

<source lang="bash"> rsync -avz 192.168.0.4::share ./ </source>