[Bug 10567] New: --abort option to halt transfer on error(s)

samba-bugs at samba.org samba-bugs at samba.org
Sat Apr 26 04:34:58 MDT 2014


           Summary: --abort option to halt transfer on error(s)
           Product: rsync
           Version: 3.1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: me at haravikk.com
         QAContact: rsync-qa at samba.org

Currently if the source of an rsync transfer goes down for whatever reason,
rsync will forge on, reporting errors for every file that is now missing
(reporting "file has vanished") until it runs out of known files to look for.

In most cases this is wasted effort, so I think it would make sense to allow
rsync to simply abort in such cases. Here is a suggestion for options that
could be used to control this:

--abort: This option indicates that rsync should abort the transfer if an error
occurs. It can optionally be supplied with a value that determines what class
of errors will cause the abort, so that it will only abort for missing files as
opposed to other issues such as long path-names.
--abort-threshold: This option supplies a number of errors that will cause
rsync to abort. If you're syncing a static hierarchy then you may set this low,
as there should be no errors at all due to changes during a sync. A positive
number indicates that the threshold is for total errors during the transfer,
while a negative value indicates a number of consecutive errors that will
trigger an abort. Two options can be set in order to set both types of
--abort-partial: This option indicates that rsync should discard any partial
transfers rather than leaving them for completion later. This also indicates
that any completed files not yet moved into position should also be discarded.
--abort-delete: This option indicates that rsync shouldn't attempt to carry out
any pending deletions (regardless of this option rsync shouldn't attempt to
delete any files which produced errors, in case they're only temporarily

Anyway, this should allow us greater control of how and when rsync fails if we
encounter unexpected circumstances. This will be particularly useful when
syncing between devices that may not always be present, or may be disconnected
during an operation.

Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the rsync mailing list