Rprotocols
Rsync
A file-copy tool that sends differences, so a repeat copy moves only changed blocks.
How it works
Rsync checksums blocks and transfers the ones that differ. It often rides SSH. It is not SFTP. A first copy still sends the whole file. Later copies are small if the file barely changed.
A 12 GB database dump is copied nightly. Night one takes 20 minutes. Night two sends 200 MB of changes and finishes in a minute. A partner who only speaks SFTP cannot take the rsync stream. They get a full SFTP PUT instead.
How it differs
Rsync is not a shared folder. It copies. It can delete extras on the destination if you pass that flag. That flag is how a typo erases a folder.
Partial files appear if the job is killed, unless you write to a temp name and rename.
Rename into place.
On the ticket
- The practical close is a log line: time, actor, byte count, result.
- Without that line the transfer is a story.
- With it, the next person can see whether this door did what the ticket claimed.
- If the path is shared, say so in the partner profile so a later change does not silently pick a different limit, key, or region.
- On a real ticket, write down the door, the byte count, and the clock.
- For rsync, that means naming the host or bucket, the expected size, and the time the other side must have a complete file.
- A progress bar is not that record.
- A 200 response that arrives before the complete call is not that record.
- If a retry is allowed, say how many and whether it resumes.
- If a person must approve the send, name the person.
- Partners who receive rsync files should match on hash or size before they import.
- A same-length corrupt file passes a size check and fails a hash.
- Keep the published hash off the only channel an attacker can edit, or treat it as a corruption check rather than a substitution check.
- When the path changes, new key, new region, new cap, update the profile the same day so the next run does not use a stale limit.
Related
Sources
- RFC 4253, SSH transport
The channel rsync usually uses