Commit b14253f1 authored by bescoto's avatar bescoto

Removed remnants of sleep-ratio, resume, and checkpoint-interval options


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@287 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 32ea12dd
...@@ -80,10 +80,6 @@ remote side. See ...@@ -80,10 +80,6 @@ remote side. See
and and
.BR --windows-mode . .BR --windows-mode .
.TP .TP
.BI "--checkpoint-interval " seconds
This option controls every how many seconds rdiff-backup checkpoints
its current status. The default is 20.
.TP
.BI "--current-time " seconds .BI "--current-time " seconds
This option is useful mainly for testing. If set, rdiff-backup will This option is useful mainly for testing. If set, rdiff-backup will
it for the current time instead of consulting the clock. The argument it for the current time instead of consulting the clock. The argument
...@@ -230,7 +226,7 @@ metadata is written to a separate file, hard link information will not ...@@ -230,7 +226,7 @@ metadata is written to a separate file, hard link information will not
be lost even if the --no-hard-links option is given (however, mirror be lost even if the --no-hard-links option is given (however, mirror
files will not be linked). If many hard-linked files are present, files will not be linked). If many hard-linked files are present,
this option can drastically increase memory usage. this option can drastically increase memory usage.
..TP .TP
.B --null-separator .B --null-separator
Use nulls (\\0) instead of newlines (\\n) as line separators, which Use nulls (\\0) instead of newlines (\\n) as line separators, which
may help when dealing with filenames containing newlines. This may help when dealing with filenames containing newlines. This
...@@ -323,10 +319,6 @@ but only allow writes as part of an incremental backup. Requests for other type ...@@ -323,10 +319,6 @@ but only allow writes as part of an incremental backup. Requests for other type
.IR path ) .IR path )
will be rejected. will be rejected.
.TP .TP
.B --resume
Resume the last aborted backup. If no aborted backups are found, exit
with error.
.TP
.BI "--resume-window " seconds .BI "--resume-window " seconds
Resume the last aborted backup if it started less than the specified Resume the last aborted backup if it started less than the specified
number of seconds ago. Otherwise start a new backup. The default is number of seconds ago. Otherwise start a new backup. The default is
...@@ -336,13 +328,6 @@ number of seconds ago. Otherwise start a new backup. The default is ...@@ -336,13 +328,6 @@ number of seconds ago. Otherwise start a new backup. The default is
Enter server mode (not to be invoked directly, but instead used by Enter server mode (not to be invoked directly, but instead used by
another rdiff-backup process on a remote computer). another rdiff-backup process on a remote computer).
.TP .TP
.BI "--sleep-ratio " ratio
Here ratio should be between 0 and 1 not inclusive. When backing up
rdiff-backup will try to spend that ratio of time just sleeping. For
example, if --sleep-ratio 0.33 is specified, rdiff-backup will spent
about a third of the time asleep, just sitting there. This can be
helpful if rdiff-backup would normally push some resource too hard.
.TP
.B --ssh-no-compression .B --ssh-no-compression
When running ssh, do not use the -C option to enable compression. When running ssh, do not use the -C option to enable compression.
.B --ssh-no-compression .B --ssh-no-compression
...@@ -893,6 +878,11 @@ handled correctly on systems with non-standard mknod syntax. ...@@ -893,6 +878,11 @@ handled correctly on systems with non-standard mknod syntax.
Files whose names are close to the maximum length (e.g. 235 chars if Files whose names are close to the maximum length (e.g. 235 chars if
the maximum is 255) may be skipped because the filenames of related the maximum is 255) may be skipped because the filenames of related
increment files would be too long. increment files would be too long.
.PP
The gzip library in some versions of python have trouble producing
files over 2GB in length. This bug will prevent rdiff-backup from
producing large compressed increments (snapshots or diffs). A
workaround is to disable compression for large uncompressable files.
.SH AUTHOR .SH AUTHOR
Ben Escoto <bescoto@stanford.edu> Ben Escoto <bescoto@stanford.edu>
......
...@@ -156,9 +156,6 @@ select_mirror = None ...@@ -156,9 +156,6 @@ select_mirror = None
# object. Access is provided to increment error counts. # object. Access is provided to increment error counts.
ITRB = None ITRB = None
# Percentage of time to spend sleeping. None means never sleep.
sleep_ratio = None
# security_level has 4 values and controls which requests from remote # security_level has 4 values and controls which requests from remote
# systems will be honored. "all" means anything goes. "read-only" # systems will be honored. "all" means anything goes. "read-only"
# means that the requests must not write to disk. "update-only" means # means that the requests must not write to disk. "update-only" means
......
...@@ -57,10 +57,9 @@ def parse_cmdlineoptions(arglist): ...@@ -57,10 +57,9 @@ def parse_cmdlineoptions(arglist):
"parsable-output", "print-statistics", "quoting-char=", "parsable-output", "print-statistics", "quoting-char=",
"remote-cmd=", "remote-schema=", "remove-older-than=", "remote-cmd=", "remote-schema=", "remove-older-than=",
"restore-as-of=", "restrict=", "restrict-read-only=", "restore-as-of=", "restrict=", "restrict-read-only=",
"restrict-update-only=", "server", "sleep-ratio=", "restrict-update-only=", "server", "ssh-no-compression",
"ssh-no-compression", "terminal-verbosity=", "test-server", "terminal-verbosity=", "test-server", "verbosity=",
"verbosity=", "version", "windows-mode", "version", "windows-mode", "windows-time-format"])
"windows-time-format"])
except getopt.error, e: except getopt.error, e:
commandline_error("Bad commandline options: %s" % str(e)) commandline_error("Bad commandline options: %s" % str(e))
...@@ -133,8 +132,6 @@ def parse_cmdlineoptions(arglist): ...@@ -133,8 +132,6 @@ def parse_cmdlineoptions(arglist):
elif opt == "-s" or opt == "--server": elif opt == "-s" or opt == "--server":
action = "server" action = "server"
Globals.server = 1 Globals.server = 1
elif opt == "--sleep-ratio":
Globals.set_float("sleep_ratio", arg, 0, 1, inclusive=0)
elif opt == "--ssh-no-compression": elif opt == "--ssh-no-compression":
Globals.set('ssh_compression', None) Globals.set('ssh_compression', None)
elif opt == "--terminal-verbosity": Log.setterm_verbosity(arg) elif opt == "--terminal-verbosity": Log.setterm_verbosity(arg)
......
...@@ -34,7 +34,6 @@ _genstr_date_regexp1 = re.compile("^(?P<year>[0-9]{4})[-/]" ...@@ -34,7 +34,6 @@ _genstr_date_regexp1 = re.compile("^(?P<year>[0-9]{4})[-/]"
_genstr_date_regexp2 = re.compile("^(?P<month>[0-9]{1,2})[-/]" _genstr_date_regexp2 = re.compile("^(?P<month>[0-9]{1,2})[-/]"
"(?P<day>[0-9]{1,2})[-/](?P<year>[0-9]{4})$") "(?P<day>[0-9]{1,2})[-/](?P<year>[0-9]{4})$")
curtime = curtimestr = None curtime = curtimestr = None
been_awake_since = None # stores last time sleep() was run
def setcurtime(curtime = None): def setcurtime(curtime = None):
"""Sets the current time in curtime and curtimestr on all systems""" """Sets the current time in curtime and curtimestr on all systems"""
...@@ -175,25 +174,6 @@ def cmp(time1, time2): ...@@ -175,25 +174,6 @@ def cmp(time1, time2):
elif time1 == time2: return 0 elif time1 == time2: return 0
else: return 1 else: return 1
def sleep(sleep_ratio):
"""Sleep for period to maintain given sleep_ratio
On my system sleeping for periods less than 1/20th of a second
doesn't seem to work very accurately, so accumulate at least that
much time before sleeping.
"""
global been_awake_since
if been_awake_since is None: # first running
been_awake_since = time.time()
else:
elapsed_time = time.time() - been_awake_since
sleep_time = elapsed_time * (sleep_ratio/(1-sleep_ratio))
if sleep_time >= 0.05:
time.sleep(sleep_time)
been_awake_since = time.time()
def genstrtotime(timestr, curtime = None): def genstrtotime(timestr, curtime = None):
"""Convert a generic time string to a time in seconds""" """Convert a generic time string to a time in seconds"""
if curtime is None: curtime = globals()['curtime'] if curtime is None: curtime = globals()['curtime']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment