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

Surviving dropped connections

Without --partial, an interrupted rsync deletes the partial destination file and you start over on next run. With --partial, the partial file is kept, and the next run does delta transfer to fill in the rest. For a 50 GB file dropped at 80 %, that's the difference between "start over" and "finish the last 10 GB."

The -P shorthand

-P is --partial --progress in one. For any large transfer, use it. There's no scenario where you want progress hidden and partials discarded.

--partial-dir for cleanliness

Plain --partial leaves partial files at their final destination paths. --partial-dir=.rsync-partial stashes them in a sibling directory until they're complete. Tidier when you don't want half-files mixed with finished ones.

Code

Resume-friendly transfers·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

Generate a large file: mkfile -n 1g /tmp/big (macOS) or dd if=/dev/zero of=/tmp/big bs=1M count=1024 (Linux). Start rsync -avzP /tmp/big host:/tmp/, watch progress, ctrl-C around 50 %. Re-run the same command and watch it pick up — confirm the destination size grows from where you stopped, not from zero.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.