일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- Python
- Kernel
- ext3
- cadre
- 쇼펜의상속자 #킨텍스메가쇼 #섬유향수탈취제
- Linux
- goaccess
- iptables
- 디스크
- 좌절교육
- rm -rf
- 칭찬교육
- Bash
- Performance
- PORT
- 리눅스
- apachetop
- http
- windows
- rsync
- PERL
- rm
- DNS
- Cache
- Disk
- 솔라리스
- CPU
- ext4
- pid
- Hack
- Today
- Total
Ben's
rsync --exclude 옵션 잘못쓰면 대박 본문
* 올바른 예: 원래 의도대로 /root/imsi 하위 파일들이 sync에서 제외됨.
strace rsync -av --exclude=/root/imsi/* --exclude /boot --exclude /var --exclude /usr --exclude /home / /disk 2> nhko.1
[root@zenoss /]# head -1 nhko.1
execve("/usr/bin/rsync", ["rsync", "-av", "--exclude=/root/imsi/*", "--exclude", "/boot", "--exclude", "/var", "--exclude", "/usr", "--exclude", "/home", "/", "/disk"], [/* 24 vars */]) = 0
* 올바르지 않은 예: 원래 의도는 /root/imsi 하위 파일들을 제외하는거였지만, 실제로는 /root/imsi/aa.tar.gz만 제외되고 나머지는 모두 /disk로 sync 됨.
strace rsync -av --exclude /root/imsi/* --exclude /boot --exclude /var --exclude /usr --exclude /home / /disk 2> nhko
[root@zenoss /]# head -1 nhko
execve("/usr/bin/rsync", ["rsync", "-av", "--exclude", "/root/imsi/aa.tar.gz", "/root/imsi/mpkang", "--exclude", "/boot", "--exclude", "/var", "--exclude", "/usr", "--exclude", "/home", "/", "/disk"], [/* 24 vars */]) = 0
* 이런 현상이 벌어지는 이유: rsync는 아래와 같이 SRC를 여러개 줄수가 있어서임.
Local: rsync [OPTION...] SRC... [DEST]
'리눅스 > 백업' 카테고리의 다른 글
trash-cli(이런 좋은게 있었네요) (0) | 2013.03.19 |
---|---|
extundelete - file undelete util for ext4 (0) | 2013.02.08 |
ext3grep 고마워 (0) | 2013.01.30 |
rsync 설치시 acl 옵션이 추가가 안될때 처리 (0) | 2013.01.16 |