1. 우분투 설정
- rsync 설치
$ sudo apt-get install rsync
- rsync 설정
$ sudo gedit /etc/default/rsync
RSYNC_ENABLE = true 로 변경
- /etc/rsyncd.conf 생성 후 아래와 같이 작성
$ sudo gedit /etc/rsyncd.conf
log file = ~/rsync.log
[hdd2]
path = /mnt/hdd2
comment = heydev rsync
uid = heydev
gid = heydev
use chroot = yes
read only = yes
host allow = *
max connection = 5
timeout 300
2. DSM 설정
- NAS로 ssh 접속
- ssh key 생성
$ ssh-keygen -t rsa
- public key를 우분투에 추가
cat ~/.ssh/id_rsa.pub (DSM) >> ~/.ssh/authorized_keys (우분투)
- 우분투측 퍼미션 설정
$ chmod 700 ~/.ssh
$ chmod 644 ~/.ssh/authorized_keys
- DSM에서 우분투로 password 없이 접속되는지 확인
$ ssh [user]@[addr]
- "작업 스케줄러 -> 생성 -> 사용자 정의 스크립트" 에서 아래와 같은 스크립트 적용
rsync -avzu -e "ssh -p 22" [user]@[addr]:/media/hdd1 /volume1/NetBackup/heydev/
3. 참조 /etc/rsyncd.conf /etc/rsyncd.conf
rsync 설치: http://blog.naver.com/PostView.nhn?blogId=feelydh&logNo=221000958812
ssh 설정: https://opentutorials.org/module/432/3742
dsm 설정: http://jh2story.myds.me/amina/print.php?bo_table=write2&wr_id=10
'ubuntu' 카테고리의 다른 글
우분투 프린터 인쇄 자동화 설정 (0) | 2022.10.02 |
---|---|
우분투에 새로운 HDD 설치시 read/write 가 안되는 문제 발생시 (0) | 2017.04.13 |
Ubuntu에 ffmpeg 설치 (0) | 2016.12.12 |
Ubuntu에서 Google drive 동기화 설정 (Grive2) (0) | 2016.12.01 |
Ubuntu16.04에 Caffe 설치 (0) | 2016.11.22 |