Feature: Partial/incomplete transfer resumption (--partial, --partial-dir, --inplace) #174
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Corresponding rsync flags/behavior:
--partial— keep partially transferred files on interruption and resume on next run--partial-dir=DIR— store partial files in a hidden directory instead of alongside destination files--inplace— update destination files in place instead of writing to a temporary file and renamingCurrent FastSync behavior:
file_save_to_disk()insrc/shared/file.c:129opens the destination withfopen(path, "wb")and writes directly to the final path. If the transfer is interrupted, the destination is left in a partial/corrupted state and the next run re-transfers from scratch.Proposed changes:
--partial,--partial-dir=<dir>,--inplacebool use_partial,char* partial_dir,bool use_inplace<dest>.fastsync.tmpandrename()to final name on success--partial: leave temp file on failure and resume if size matches on next incremental run--partial-dir: write to<partial-dir>/<relative-path>.fastsync.tmp--inplace: open existing file for write and overwrite blocks as they arrive (more complex; lower priority)Priority: high
Rationale: Resilience over unreliable networks is a core rsync use case. Without partial resume, large-file transfers over WAN are risky.
Acceptance criteria:
--partialis used--incremental+--partialare combined--partial-dirisolates temp files from the destination tree