C.W.K.
Stream
Lesson 03 of 12 · published

rsync — 이기는 이유

~15 min · rsync, delta-transfer, fundamentals

Level 0Pinger
0 XP0/101 lessons0/12 achievements
0/150 XP to next level150 XP to go0% complete

킬러 기능 — delta transfer

rsync 가 출처와 목적지를 block 레벨로 비교, 다른 것만 전송. 1 GB 로그 파일에서 1 KB 문자열 바뀜? rsync 가 대략 1 KB + checksum 보냄 — 1 GB 아님. Unix 세계의 universal 파일 sync 도구로 만드는 속성.

Delta 위에 얻는 것

  • 비행 중 compression(-z) — 느린 link 용.
  • 전송 끊겼을 때 resume--partial.
  • Exclude 패턴node_modules, .git 등 건너뛰기.
  • 권한, 타임스탬프, symlink, ownership — archive mode (-a) 가 보존.
  • Dry run(-n) — 실행 없이 정확히 뭐 바뀔지 봄.
  • Sync 삭제(--delete) — 목적지를 출처의 정확한 mirror 로.
  • 로컬 또는 SSH 위 — 둘 다 같은 구문.

Code

고전적 호출·bash
# Local-to-local sync
rsync source.txt destination.txt

# The standard daily command
rsync -avz --progress source/ dest/
# -a  archive mode (rlptgoD — preserves everything sane)
# -v  verbose
# -z  compress in transit
# --progress  per-file transfer bars

# Over SSH (same syntax with user@host)
rsync -avz --progress ./project/ office:/home/you_username/project/

External links

Exercise

전에 scp 한 디렉토리 찾아. rsync -avz --progress ./that-dir/ host:/tmp/that-dir-rsync/ 돌려 — 시간 메모. 변경 없이 다시 돌려 — 초 단위로 끝나야 함 (delta transfer 가 보낼 거 못 찾음). 출처 파일 하나 수정, 다시 — 그 파일만 전송 보임.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.