summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-03-28 17:49:02 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-03-28 17:49:02 +0000
commitde9064bb82986f893af5d72fb37fb504b676bffb (patch)
tree9bcc53dbdbfc965d6d6f09cc4d0db1392324fd09
parent292124033832b705eb482de4d305ad6e452125c6 (diff)
downloadrdiff-backup-de9064bb82986f893af5d72fb37fb504b676bffb.tar.gz
Added more possible restore times to compensate for old timezone bug
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@570 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG7
-rw-r--r--rdiff-backup/dist/rdiff-backup.spec.template5
-rw-r--r--rdiff-backup/rdiff_backup/restore.py24
3 files changed, 27 insertions, 9 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 57a6ec2..fb21445 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,3 +1,10 @@
+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)
---------------------------
diff --git a/rdiff-backup/dist/rdiff-backup.spec.template b/rdiff-backup/dist/rdiff-backup.spec.template
index 8144fe2..27fe826 100644
--- a/rdiff-backup/dist/rdiff-backup.spec.template
+++ b/rdiff-backup/dist/rdiff-backup.spec.template
@@ -14,7 +14,7 @@ License: GPL
Group: Applications/Archiving
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
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
rdiff-backup is a script, written in Python, that backs up one
@@ -54,6 +54,9 @@ rm -rf $RPM_BUILD_ROOT
%doc CHANGELOG COPYING FAQ.html examples.html README
%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
- Readded python2/python code; turns out not everyone calls it python
- A number of changes from Fedora rpm.
diff --git a/rdiff-backup/rdiff_backup/restore.py b/rdiff-backup/rdiff_backup/restore.py
index 1492cfd..038ca91 100644
--- a/rdiff-backup/rdiff_backup/restore.py
+++ b/rdiff-backup/rdiff_backup/restore.py
@@ -94,7 +94,6 @@ def ListAtTime(mirror_rp, inc_rp, time):
assert mirror_rp.conn is Globals.local_connection, "Run locally only"
MirrorStruct.set_mirror_and_rest_times(time)
MirrorStruct.initialize_rf_cache(mirror_rp, inc_rp)
-
old_iter = MirrorStruct.get_mirror_rorp_iter(_rest_time, 1)
for rorp in old_iter: yield rorp
@@ -152,9 +151,8 @@ class MirrorStruct:
and what was actually on the mirror side will correspond to the
older one.
- So here we assume all rdiff-backup events were recorded in
- "increments" increments, and if it's in-between we pick the
- older one here.
+ So if restore_to_time is inbetween two increments, return the
+ older one.
"""
inctimes = cls.get_increment_times()
@@ -164,11 +162,21 @@ class MirrorStruct:
return min(inctimes)
def get_increment_times(cls, rp = None):
- """Return list of times of backups, including current mirror"""
- if not _mirror_time: return_list = [cls.get_mirror_time()]
- else: return_list = [_mirror_time]
+ """Return list of times of backups, including current mirror
+
+ 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")
- 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
def initialize_rf_cache(cls, mirror_base, inc_base):