From de9064bb82986f893af5d72fb37fb504b676bffb Mon Sep 17 00:00:00 2001 From: bescoto Date: Mon, 28 Mar 2005 17:49:02 +0000 Subject: 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 --- rdiff-backup/CHANGELOG | 7 +++++++ rdiff-backup/dist/rdiff-backup.spec.template | 5 ++++- rdiff-backup/rdiff_backup/restore.py | 24 ++++++++++++++++-------- 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 - 0.13.5-1 +- Set librsync >= 0.9.7 to encourage upgrade + * Sat Dec 15 2003 Ben Escoto - 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.