From 741a80f344994a5746904ad9cb0909a5c6389b1b Mon Sep 17 00:00:00 2001 From: bescoto Date: Sun, 2 Mar 2003 22:23:25 +0000 Subject: Removed remnants of sleep-ratio, resume, and checkpoint-interval options git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@287 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/rdiff-backup.1 | 22 ++++++---------------- rdiff-backup/rdiff_backup/Globals.py | 3 --- rdiff-backup/rdiff_backup/Main.py | 9 +++------ rdiff-backup/rdiff_backup/Time.py | 20 -------------------- 4 files changed, 9 insertions(+), 45 deletions(-) diff --git a/rdiff-backup/rdiff-backup.1 b/rdiff-backup/rdiff-backup.1 index 53b662d..6f892d3 100644 --- a/rdiff-backup/rdiff-backup.1 +++ b/rdiff-backup/rdiff-backup.1 @@ -80,10 +80,6 @@ remote side. See and .BR --windows-mode . .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 This option is useful mainly for testing. If set, rdiff-backup will 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 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, this option can drastically increase memory usage. -..TP +.TP .B --null-separator Use nulls (\\0) instead of newlines (\\n) as line separators, which 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 .IR path ) will be rejected. .TP -.B --resume -Resume the last aborted backup. If no aborted backups are found, exit -with error. -.TP .BI "--resume-window " seconds Resume the last aborted backup if it started less than the specified 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 another rdiff-backup process on a remote computer). .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 When running ssh, do not use the -C option to enable compression. .B --ssh-no-compression @@ -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 the maximum is 255) may be skipped because the filenames of related 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 Ben Escoto diff --git a/rdiff-backup/rdiff_backup/Globals.py b/rdiff-backup/rdiff_backup/Globals.py index f472512..b9045f7 100644 --- a/rdiff-backup/rdiff_backup/Globals.py +++ b/rdiff-backup/rdiff_backup/Globals.py @@ -156,9 +156,6 @@ select_mirror = None # object. Access is provided to increment error counts. 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 # systems will be honored. "all" means anything goes. "read-only" # means that the requests must not write to disk. "update-only" means diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index 27ef56c..c511c26 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -57,10 +57,9 @@ def parse_cmdlineoptions(arglist): "parsable-output", "print-statistics", "quoting-char=", "remote-cmd=", "remote-schema=", "remove-older-than=", "restore-as-of=", "restrict=", "restrict-read-only=", - "restrict-update-only=", "server", "sleep-ratio=", - "ssh-no-compression", "terminal-verbosity=", "test-server", - "verbosity=", "version", "windows-mode", - "windows-time-format"]) + "restrict-update-only=", "server", "ssh-no-compression", + "terminal-verbosity=", "test-server", "verbosity=", + "version", "windows-mode", "windows-time-format"]) except getopt.error, e: commandline_error("Bad commandline options: %s" % str(e)) @@ -133,8 +132,6 @@ def parse_cmdlineoptions(arglist): elif opt == "-s" or opt == "--server": action = "server" Globals.server = 1 - elif opt == "--sleep-ratio": - Globals.set_float("sleep_ratio", arg, 0, 1, inclusive=0) elif opt == "--ssh-no-compression": Globals.set('ssh_compression', None) elif opt == "--terminal-verbosity": Log.setterm_verbosity(arg) diff --git a/rdiff-backup/rdiff_backup/Time.py b/rdiff-backup/rdiff_backup/Time.py index 1b2975e..289df0a 100644 --- a/rdiff-backup/rdiff_backup/Time.py +++ b/rdiff-backup/rdiff_backup/Time.py @@ -34,7 +34,6 @@ _genstr_date_regexp1 = re.compile("^(?P[0-9]{4})[-/]" _genstr_date_regexp2 = re.compile("^(?P[0-9]{1,2})[-/]" "(?P[0-9]{1,2})[-/](?P[0-9]{4})$") curtime = curtimestr = None -been_awake_since = None # stores last time sleep() was run def setcurtime(curtime = None): """Sets the current time in curtime and curtimestr on all systems""" @@ -175,25 +174,6 @@ def cmp(time1, time2): elif time1 == time2: return 0 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): """Convert a generic time string to a time in seconds""" if curtime is None: curtime = globals()['curtime'] -- cgit v1.2.1