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

Partial & Resume

~10 min · rsync, partial, resume, P-flag

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

끊긴 연결에서 살아남기

--partial 없으면 끊긴 rsync 가 partial destination 파일 삭제 — 다음에 처음부터. 있으면 partial 파일 유지, 다음 실행이 delta transfer 로 나머지 채움. 80% 에서 끊긴 50 GB 파일 — "처음부터" vs "마지막 10 GB 끝내기" 차이.

-P 단축

-P--partial --progress 한 번에. 큰 전송엔 다 써. Progress 숨기고 partial 버리기 원하는 시나리오 없어.

--partial-dir 깔끔함 위해

Plain --partial 이 partial 파일을 최종 destination path 에 둠. --partial-dir=.rsync-partial 이 완료까지 형제 디렉토리에 stash. 반쪽 파일이랑 끝난 거 안 섞고 싶을 때 더 정돈.

Code

Resume 친화 전송·bash
# Always with -P for big files
rsync -avzP big-file.tar.gz host:/dest/

# Equivalent to:
rsync -avz --partial --progress big-file.tar.gz host:/dest/

# Cleaner — partial files in a sibling directory
rsync -avz --partial-dir=.rsync-partial --progress big-tree/ host:/dest/

# If interrupted, run the same command again to resume

External links

Exercise

큰 파일 생성 — mkfile -n 1g /tmp/big(macOS) 또는 dd if=/dev/zero of=/tmp/big bs=1M count=1024(Linux). rsync -avzP /tmp/big host:/tmp/ 시작, progress 봐, 50% 즈음 ctrl-C. 같은 명령 다시 돌려서 받는 거 봐 — destination 크기가 멈춘 곳부터 자라는지 확인 (zero 부터 X).

Progress

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

댓글 0

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

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