bugrdiff-backup - Bugs: bug #16534, Exception if you request a deleted...

 
 

bug #16534: Exception if you request a deleted increment

Submitted by:  None
Submitted on:  Sat 06 May 2006 03:44:00 AM UTC  
 
Category: NoneSeverity: 2 - Minor
Item Group: NoneStatus: Need Info
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 19 May 2007 07:01:25 PM UTC, comment #5:

this has been fixed in 1.0.5 and somewhere in 1.1.x i forget when.

dean gaudet <dgaudet>
Project Administrator
Tue 10 Apr 2007 03:55:14 PM UTC, comment #4:

Oops, I'm dumb and didn't read the markup reminder before I posted.

Whitney <wmarshall>
Tue 10 Apr 2007 03:49:18 PM UTC, comment #3:

I have seen this behavior as well. It seems that rdiff-backup dies with an exception when you call --remove-older-than with a number of sessions that is (actual number + 1). For instance, the system directory has 13 increments, one increment per session:

<code># rdiff-backup -l system
Found 13 increments:
increments.2007-03-28T04:02:13-05:00.dir Wed Mar 28 04:02:13 2007
increments.2007-03-29T04:04:02-05:00.dir Thu Mar 29 04:04:02 2007
increments.2007-03-30T04:01:33-05:00.dir Fri Mar 30 04:01:33 2007
increments.2007-03-31T04:01:39-05:00.dir Sat Mar 31 04:01:39 2007
increments.2007-04-01T04:05:27-05:00.dir Sun Apr 1 04:05:27 2007
increments.2007-04-02T04:01:29-05:00.dir Mon Apr 2 04:01:29 2007
increments.2007-04-03T04:01:32-05:00.dir Tue Apr 3 04:01:32 2007
increments.2007-04-04T04:12:17-05:00.dir Wed Apr 4 04:12:17 2007
increments.2007-04-05T04:01:08-05:00.dir Thu Apr 5 04:01:08 2007
increments.2007-04-06T04:23:33-05:00.dir Fri Apr 6 04:23:33 2007
increments.2007-04-07T04:01:18-05:00.dir Sat Apr 7 04:01:18 2007
increments.2007-04-08T04:01:19-05:00.dir Sun Apr 8 04:01:19 2007
increments.2007-04-09T04:05:28-05:00.dir Mon Apr 9 04:05:28 2007
Current mirror: Tue Apr 10 04:01:28 2007
</code>

Here are the results of running --remove-older-than with session numbers from 13-20:

<code># rdiff-backup --remove-older-than 13B system
No increments older than Wed Mar 28 04:02:13 2007 found, exiting.

# rdiff-backup --remove-older-than 14B system
Traceback (most recent call last):
File "/usr/bin/rdiff-backup", line 23, in ?
rdiff_backup.Main.Main(sys.argv[1:])
File "/usr/lib/python2.4/site-packages/rdiff_backup/Main.py", line 285, in Main
take_action(rps)
File "/usr/lib/python2.4/site-packages/rdiff_backup/Main.py", line 263, in take_action
elif action == "remove-older-than": RemoveOlderThan(rps[0])
File "/usr/lib/python2.4/site-packages/rdiff_backup/Main.py", line 764, in RemoveOlderThan
time = rot_check_time(remove_older_than_string)
File "/usr/lib/python2.4/site-packages/rdiff_backup/Main.py", line 771, in rot_check_time
try: time = Time.genstrtotime(time_string)
File "/usr/lib/python2.4/site-packages/rdiff_backup/Time.py", line 223, in genstrtotime
return time_from_session(int(timestr[:-1]), rp)
File "/usr/lib/python2.4/site-packages/rdiff_backup/Time.py", line 192, in time_from_session
return session_times[-session_num-1]
IndexError: list index out of range

# rdiff-backup --remove-older-than 15B system
No increments older than Wed Mar 28 04:02:13 2007 found, exiting.

# rdiff-backup --remove-older-than 16B system
No increments older than Wed Mar 28 04:02:13 2007 found, exiting.

# rdiff-backup --remove-older-than 17B system
No increments older than Wed Mar 28 04:02:13 2007 found, exiting.

# rdiff-backup --remove-older-than 18B system
No increments older than Wed Mar 28 04:02:13 2007 found, exiting.

# rdiff-backup --remove-older-than 19B system
No increments older than Wed Mar 28 04:02:13 2007 found, exiting.

# rdiff-backup --remove-older-than 20B system
No increments older than Wed Mar 28 04:02:13 2007 found, exiting.
</code>

This may be fixed in later versions. I'm running:

<code># python -V
Python 2.4.3
# rdiff-backup --version
rdiff-backup 1.0.4
</code>

Whitney <wmarshall>
Mon 18 Dec 2006 11:18:51 PM UTC, comment #2:

This set of commands currently WorksForMe in rdiff-backup 1.1.7. Are you sure this is still a bug? I have tested under Python 2.4 (you are running 2.3 below), but I believe the code under discussion will work in 2.3.

If you find that this is still a bug for you, can you send in a better test case? i.e., how to reproduce the bug. Also, what version of rdiff-backup, etc.?

Andrew Ferguson <owsla>
Project Administrator
Sat 06 May 2006 03:45:07 AM UTC, comment #1:

Contact info: Federico Sacerdoti, fds, deshaw.com

Anonymous
Sat 06 May 2006 03:44:00 AM UTC, original submission:

Just playing around with rdiff-backup, which looks very good, and is written in a good language :) However I found a case that probably should give a nice error message instead of this traceback.

Delete an increment, then ask for it in a --r. Note that if I ask for a revision much older (7B, I have not done seven backups) then there is no error.

[fds@drdsa00 restore]$ rdiff-backup --remove-older-than 2B ~/Archive/rdiff-backup/
Deleting increment at time:
Fri May 5 23:23:41 2006
[fds@drdsa00 restore]$ rdiff-backup -r 3B --force ~/Archive/rdiff-backup/ hi
Traceback (most recent call last):
File "/usr/bin/rdiff-backup", line 23, in ?
rdiff_backup.Main.Main(sys.argv[1:])
File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 285, in Main
take_action(rps)
File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 265, in take_action
elif action == "restore-as-of": Restore(rps[0], rps[1], 1)
File "/usr/lib64/python2.3/site-packages/rdiff_backup/Main.py", line 499, in Restore
try: time = Time.genstrtotime(restore_timestr, rp = inc_rpath)
File "/usr/lib64/python2.3/site-packages/rdiff_backup/Time.py", line 223, in genstrtotime
return time_from_session(int(timestr[:-1]), rp)
File "/usr/lib64/python2.3/site-packages/rdiff_backup/Time.py", line 192, in time_from_session
return session_times[-session_num-1]
IndexError: list index out of range
[fds@drdsa00 restore]$

-Federico

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dgaudet (Posted a comment)
  • -unavailable- added by wmarshall (Posted a comment)
  • -unavailable- added by owsla (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 19 May 2007 07:01:25 PM UTCdgaudetOpen/ClosedOpen=>Closed
    Mon 18 Dec 2006 11:18:51 PM UTCowslaSeverity3 - Normal=>2 - Minor
      StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1