Bug 6062 - [FMR]: Add an option to terminate rsync after a specific time
Summary: [FMR]: Add an option to terminate rsync after a specific time
Status: RESOLVED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.4
Hardware: x86 Linux
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-22 02:01 UTC by Craig Phillips
Modified: 2020-07-26 01:37 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 Craig Phillips 2009-01-22 02:01:53 UTC
Many of us have broadband with usage restrictions like an 8GB download limit per month when downloaded in peak periods (off peak is unrestricted between 00:00 and 06:00).  So for those with restrictions like this will often run backups nightly to run between this time.

Currently I have written a wrapper script to rsync called lrsync that accepts an option of --end-time.  This option takes a timestamp that will force rsync to terminate when the current time exceeds the time represented by the timestamp.  For example, running lrsync at midnight with the following option:

  lrsync --end-time $(( $(date +%s) + 21600 ))

...will force rsync to terminate at 6 am.  This ensures no data is sent during the peak periods to avoid using up the data transfer limit imposed by the ISP.

It would be nice for this feature to be built into rsync since I think it would be useful for others like myself, with broadband usage restrictions.
Comment 1 Matt McCutchen 2009-01-22 08:49:56 UTC
What is the benefit of building this feature into rsync compared to using a wrapper script (which you could contribute to the support/ dir of the distribution)?
Comment 2 Craig Phillips 2009-01-22 09:00:02 UTC
I guess no benefit if there is a place I can make a contribution.  How do I go about adding my wrapper to the support/ dir?
Comment 3 Craig Phillips 2009-01-22 10:25:03 UTC
I have created a google code project containing the script.  Feel free to submit this to the distribution support/ dir as I am unable to do so.

http://lrsync.googlecode.com/files/lrsync.zip
Comment 4 Wayne Davison 2020-07-26 01:37:04 UTC
Version 3.2.3 will have the --stop-at and --stop-after options based on the long-standing time-limit.diff patch.