Commit 81065bd1 authored by bescoto's avatar bescoto

Added more possible restore times to compensate for old timezone bug


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@570 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent fd10a45b
New in v0.13.6 (2005/??/??)
---------------------------
Added fix for listing/restoring certain bad archives made when there
was a timezone bug. (Thanks to Stephen Isard)
New in v0.13.5 (2005/03/28) New in v0.13.5 (2005/03/28)
--------------------------- ---------------------------
......
...@@ -14,7 +14,7 @@ License: GPL ...@@ -14,7 +14,7 @@ License: GPL
Group: Applications/Archiving Group: Applications/Archiving
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %{PYTHON_NAME} >= %{PYTHON_VERSION}, %{PYTHON_NAME} < %{NEXT_PYTHON_VERSION} Requires: %{PYTHON_NAME} >= %{PYTHON_VERSION}, %{PYTHON_NAME} < %{NEXT_PYTHON_VERSION}
BuildPrereq: %{PYTHON_NAME}-devel >= 2.2, librsync-devel >= 0.9.6 BuildPrereq: %{PYTHON_NAME}-devel >= 2.2, librsync-devel >= 0.9.7
%description %description
rdiff-backup is a script, written in Python, that backs up one rdiff-backup is a script, written in Python, that backs up one
...@@ -54,6 +54,9 @@ rm -rf $RPM_BUILD_ROOT ...@@ -54,6 +54,9 @@ rm -rf $RPM_BUILD_ROOT
%doc CHANGELOG COPYING FAQ.html examples.html README %doc CHANGELOG COPYING FAQ.html examples.html README
%changelog %changelog
* Mon Mar 28 2005 Ben Escoto <ben@emerose.org> - 0.13.5-1
- Set librsync >= 0.9.7 to encourage upgrade
* Sat Dec 15 2003 Ben Escoto <bescoto@stanford.edu> - 0.12.6-2 * Sat Dec 15 2003 Ben Escoto <bescoto@stanford.edu> - 0.12.6-2
- Readded python2/python code; turns out not everyone calls it python - Readded python2/python code; turns out not everyone calls it python
- A number of changes from Fedora rpm. - A number of changes from Fedora rpm.
......
...@@ -94,7 +94,6 @@ def ListAtTime(mirror_rp, inc_rp, time): ...@@ -94,7 +94,6 @@ def ListAtTime(mirror_rp, inc_rp, time):
assert mirror_rp.conn is Globals.local_connection, "Run locally only" assert mirror_rp.conn is Globals.local_connection, "Run locally only"
MirrorStruct.set_mirror_and_rest_times(time) MirrorStruct.set_mirror_and_rest_times(time)
MirrorStruct.initialize_rf_cache(mirror_rp, inc_rp) MirrorStruct.initialize_rf_cache(mirror_rp, inc_rp)
old_iter = MirrorStruct.get_mirror_rorp_iter(_rest_time, 1) old_iter = MirrorStruct.get_mirror_rorp_iter(_rest_time, 1)
for rorp in old_iter: yield rorp for rorp in old_iter: yield rorp
...@@ -152,9 +151,8 @@ class MirrorStruct: ...@@ -152,9 +151,8 @@ class MirrorStruct:
and what was actually on the mirror side will correspond to the and what was actually on the mirror side will correspond to the
older one. older one.
So here we assume all rdiff-backup events were recorded in So if restore_to_time is inbetween two increments, return the
"increments" increments, and if it's in-between we pick the older one.
older one here.
""" """
inctimes = cls.get_increment_times() inctimes = cls.get_increment_times()
...@@ -164,11 +162,21 @@ class MirrorStruct: ...@@ -164,11 +162,21 @@ class MirrorStruct:
return min(inctimes) return min(inctimes)
def get_increment_times(cls, rp = None): def get_increment_times(cls, rp = None):
"""Return list of times of backups, including current mirror""" """Return list of times of backups, including current mirror
if not _mirror_time: return_list = [cls.get_mirror_time()]
else: return_list = [_mirror_time] Take the total list of times from the increments.<time>.dir
file and the mirror_metadata file. Sorted ascending.
"""
# use dictionary to remove dups
if not _mirror_time: d = {cls.get_mirror_time(): None}
else: d = {_mirror_time: None}
if not rp or not rp.index: rp = Globals.rbdir.append("increments") if not rp or not rp.index: rp = Globals.rbdir.append("increments")
for inc in get_inclist(rp): return_list.append(inc.getinctime()) for inc in get_inclist(rp): d[inc.getinctime()] = None
for inc in get_inclist(Globals.rbdir.append("mirror_metadata")):
d[inc.getinctime()] = None
return_list = d.keys()
return_list.sort()
return return_list return return_list
def initialize_rf_cache(cls, mirror_base, inc_base): def initialize_rf_cache(cls, mirror_base, inc_base):
......
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