bugrdiff-backup - Bugs: bug #20291, rdiff-backup fails after all...

 
 

bug #20291: rdiff-backup fails after all increments are removed

Submitted by:  None
Submitted on:  Thu 28 Jun 2007 07:17:48 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
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.

 

Tue 25 Dec 2007 02:12:40 AM UTC, comment #3:

Thank you for the test case!

This bug has now been fixed in CVS and will be a part of 1.1.15 and subsequent releases.

Andrew Ferguson <owsla>
Project Administrator
Sun 02 Dec 2007 10:54:56 PM UTC, comment #2:

I have the same issue with rdiff-backup 1.1.5, Linux kernel 2.6.20, Python 2.5.1. I am using stock binaries from my distribution: Ubuntu 7.04. No network. Nothing special.

The problem can be duplicated from scratch with the following sequence of commands executed in an empty temporary directory. The sleep commands are required to update mtime by at least one second between successive backups.

mkdir source
mkdir backup
echo AAA > source/file
rdiff-backup source backup
sleep 2
echo BBB > source/file
rdiff-backup source backup
rdiff-backup --remove-older-than now backup
sleep 2
echo CCC > source/file
rdiff-backup source backup

Here is the output log for the above command sequence, showing the error. Let me know if you need any more information.
----------------------------------------
user@host:~/test$ ls -l
total 0
user@host:~/test$ mkdir source
user@host:~/test$ mkdir backup
user@host:~/test$ echo AAA > source/file
user@host:~/test$ rdiff-backup source backup
user@host:~/test$ sleep 2
user@host:~/test$ echo BBB > source/file
user@host:~/test$ rdiff-backup source backup
user@host:~/test$ rdiff-backup --remove-older-than now backup
Deleting increment at time:
Sun Dec 2 17:45:24 2007
user@host:~/test$ sleep 2
user@host:~/test$ echo CCC > source/file
user@host:~/test$ rdiff-backup source backup
Exception '[Errno 17] File exists: 'backup/rdiff-backup-data/increments'' raised of class '<type 'exceptions.OSError'>':
File "/var/lib/python-support/python2.5/rdiff_backup/Main.py", line 295, in error_check_Main
try: Main(arglist)
File "/var/lib/python-support/python2.5/rdiff_backup/Main.py", line 315, in Main
take_action(rps)
File "/var/lib/python-support/python2.5/rdiff_backup/Main.py", line 271, in take_action
elif action == "backup": Backup(rps[0], rps[1])
File "/var/lib/python-support/python2.5/rdiff_backup/Main.py", line 334, in Backup
backup.Mirror_and_increment(rpin, rpout, incdir)
File "/var/lib/python-support/python2.5/rdiff_backup/backup.py", line 51, in Mirror_and_increment
DestS.patch_and_increment(dest_rpath, source_diffiter, inc_rpath)
File "/var/lib/python-support/python2.5/rdiff_backup/backup.py", line 229, in patch_and_increment
ITR(diff.index, diff)
File "/var/lib/python-support/python2.5/rdiff_backup/rorpiter.py", line 268, in _call_
else: self.root_branch.start_process(*args)
File "/var/lib/python-support/python2.5/rdiff_backup/backup.py", line 684, in start_process
inc = increment.Increment(diff_rorp, self.base_rp, inc_prefix)
File "/var/lib/python-support/python2.5/rdiff_backup/increment.py", line 38, in Increment
incpref.mkdir()
File "/var/lib/python-support/python2.5/rdiff_backup/rpath.py", line 863, in mkdir
self.conn.os.mkdir(self.path)

Traceback (most recent call last):
File "/usr/bin/rdiff-backup", line 23, in <module>
rdiff_backup.Main.error_check_Main(sys.argv[1:])
File "/var/lib/python-support/python2.5/rdiff_backup/Main.py", line 295, in error_check_Main
try: Main(arglist)
File "/var/lib/python-support/python2.5/rdiff_backup/Main.py", line 315, in Main
take_action(rps)
File "/var/lib/python-support/python2.5/rdiff_backup/Main.py", line 271, in take_action
elif action == "backup": Backup(rps[0], rps[1])
File "/var/lib/python-support/python2.5/rdiff_backup/Main.py", line 334, in Backup
backup.Mirror_and_increment(rpin, rpout, incdir)
File "/var/lib/python-support/python2.5/rdiff_backup/backup.py", line 51, in Mirror_and_increment
DestS.patch_and_increment(dest_rpath, source_diffiter, inc_rpath)
File "/var/lib/python-support/python2.5/rdiff_backup/backup.py", line 229, in patch_and_increment
ITR(diff.index, diff)
File "/var/lib/python-support/python2.5/rdiff_backup/rorpiter.py", line 268, in _call_
else: self.root_branch.start_process(*args)
File "/var/lib/python-support/python2.5/rdiff_backup/backup.py", line 684, in start_process
inc = increment.Increment(diff_rorp, self.base_rp, inc_prefix)
File "/var/lib/python-support/python2.5/rdiff_backup/increment.py", line 38, in Increment
incpref.mkdir()
File "/var/lib/python-support/python2.5/rdiff_backup/rpath.py", line 863, in mkdir
self.conn.os.mkdir(self.path)
OSError: [Errno 17] File exists: 'backup/rdiff-backup-data/increments'

Anonymous
Tue 10 Jul 2007 07:58:35 PM UTC, comment #1:

rdiff-backup already removes the increments directory after running "rdiff-backup --remove-older-than now --force /backup/path". Furthermore, it already checks that the increments directory doesn't exist before creating it.

I think stale data is at fault here. Are you using a network filesystem for your backup dir?

Andrew Ferguson <owsla>
Project Administrator
Thu 28 Jun 2007 07:17:48 PM UTC, original submission:

rdiff-backup v.1.1.11 running on Linux Ubuntu with a 2.6.20 kernel, python 2.4

If I remove all existing increments from my backup, for example with:
rdiff-backup --remove-older-than now --force /mnt/backup/jambo

Then the next backup fails with:
Exception '[Errno 17] File exists: '/mnt/backup/jambo/rdiff-backup-data/increments'' raised of class 'exceptions.OSError':
(I've attached a full trace)

It looks like it's trying to re-create the existing-but-empty increments directory. The next backup after that issues the "regressing destination now" message and then works fine.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #13194:  rdiff-backup.trace added by None (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 25 Dec 2007 02:12:40 AM UTCowslaStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Tue 25 Dec 2007 01:45:45 AM UTCowslaStatusNeed Info=>In Progress
    Tue 10 Jul 2007 07:58:35 PM UTCowslaStatusNone=>Need Info
    Thu 28 Jun 2007 07:17:48 PM UTCNoneAttached File-=>Added rdiff-backup.trace, #13194

    Back to the top


    Powered by Savane 3.1-cleanup1