rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[rdiff-backup-users] Assertion error when performing case sensitivity te


From: JoSH Lehan
Subject: [rdiff-backup-users] Assertion error when performing case sensitivity test on filesystem before restore
Date: Wed, 18 Mar 2009 20:05:42 -0700

Hello there.

I'm running into a problem with rdiff-backup.  I get an assertion
error when rdiff-backup performs the case sensitivity test on the
filesystem, when doing a restore.

Because of this assertion error, the restore never happens.

I comment out the assertion in the Python code, and the error goes
away!  The restore then completes successfully.

I'm wondering, then, what was the reason for this assertion?  What
purpose does it serve?  I don't want to mask true error conditions, or
introduce the possibility of corrupted data, by removing this
assertion.

The rdiff-backup data store is on a Linux machine, ext3 filesystem.

The place the data is being restored to is mounted over the network,
as a cifs filesystem.  It's a Windows machine.  I'm pretty sure the
underlying filesystem is NTFS, but am not sure.  The NTFS permissions
are sane (I have full read, write, and delete permissions within the
directory I am restoring into).

Here's the Python traceback:

Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 23, in <module>
    rdiff_backup.Main.error_check_Main(sys.argv[1:])
  File "/usr/lib/python2.5/site-packages/rdiff_backup/Main.py", line
302, in error_check_Main
    try: Main(arglist)
  File "/usr/lib/python2.5/site-packages/rdiff_backup/Main.py", line
322, in Main
    take_action(rps)
  File "/usr/lib/python2.5/site-packages/rdiff_backup/Main.py", line
288, in take_action
    elif action == "restore-as-of": Restore(rps[0], rps[1], 1)
  File "/usr/lib/python2.5/site-packages/rdiff_backup/Main.py", line
487, in Restore
    dest_rp.conn.fs_abilities.restore_set_globals(dest_rp)
  File "/usr/lib/python2.5/site-packages/rdiff_backup/fs_abilities.py",
line 809, in restore_set_globals
    dest_fsa = FSAbilities('restore target').init_readwrite(rpout)
  File "/usr/lib/python2.5/site-packages/rdiff_backup/fs_abilities.py",
line 151, in init_readwrite
    self.set_case_sensitive_readwrite(subdir)
  File "/usr/lib/python2.5/site-packages/rdiff_backup/fs_abilities.py",
line 292, in set_case_sensitive_readwrite
    assert not upper_a.lstat()

Here's the offending lines of Python code, from fs_abilities.py:

       def set_case_sensitive_readwrite(self, subdir):
                """Determine if directory at rp is case sensitive by writing"""
                assert not self.read_only
                upper_a = subdir.append("A")
                upper_a.touch()
                lower_a = subdir.append("a")
                if lower_a.lstat():
                        lower_a.delete()
                        upper_a.setdata()
                        assert not upper_a.lstat() #<-- ASSERT HAPPENS HERE
                        self.case_sensitive = 0
                else:
                        upper_a.delete()
                        self.case_sensitive = 1

As this filesystem is case retentive but not case sensitive, the code
takes the "case_sensitive = 0" path above, thus hitting the assertion.

So, does anybody know the purpose of this assertion?

Thanks!

Josh




reply via email to

[Prev in Thread] Current Thread [Next in Thread]