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

 
 

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

Submitter:  None
Submitted:  Thu 28 Jun 2007 07:17:48 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group 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 Files:
   
   
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
  • -email is unavailable- added by owsla (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-12-25 owsla StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2007-12-25 owsla StatusNeed Info In Progress
    2007-07-10 owsla StatusNone Need Info
    2007-06-28 None Attached File- Added rdiff-backup.trace, #13194

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code