Bug 10540 - --max-transfer and --create-freespace options for working with limited space
Summary: --max-transfer and --create-freespace options for working with limited space
Status: NEW
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-04 21:42 UTC by Haravikk
Modified: 2014-04-04 21:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Haravikk 2014-04-04 21:42:49 UTC
In order to use options such as --delay-updates etc. it is necessary to ensure a target file-system has plenty of free space, with rsync unable to do anything if space runs out, other than to throw error after error. This usually necessitates either enough capacity that this should never happen, multi-stage transfers, or pre-flight scripts to guess required space and make sure that much is free.

What I'd like to propose are two options to give rsync the ability to manage its requirement for free-space itself, these would be:

--max-transfer, this option sets a limit on how much data rsync will transfer, once this limit is reached rsync will stop with a soft-error. Use of a partial-dir is recommended as it allows an incomplete file to be picked up, while files that did complete within the transfer size window will be moved into placed as normal.

--create-freespace, this option, when set, tells rsync that it can attempt to free up space if it runs out. To do-so, it will first perform any pending deletions (e.g - from --delete-during), before moving delayed updates into position. If this still leaves it with insufficient free-space then it throw an error and stop.