[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[rdiff-backup-users] [patch] rdiff-backup over encfs + sshfs fix
From: |
Jon Kolb |
Subject: |
[rdiff-backup-users] [patch] rdiff-backup over encfs + sshfs fix |
Date: |
Thu, 30 Aug 2007 14:21:48 -0400 |
User-agent: |
Thunderbird 2.0.0.6 (Windows/20070728) |
I've recently set up a backup system for a server of mine using
rdiff-backup over encfs + sshfs. The initial backup worked perfectly,
but any subsequent backups threw an error in rpath.py on what is now
line 242 in cvs.
After poking around for a while, I discovered that on encfs/sshfs (or
perhaps fuse in general), os.rename fails with "Operation not permitted"
if the destination file already exists. I changed my rpath.py to delete
an existing destination file, and it's working perfectly now.
This may also be the same issue seen in an old thread (something about
ncpfs).
Regards,
Jon
--- rpath.py.orig 2007-08-30 14:18:28.000000000 -0400
+++ rpath.py 2007-08-30 12:14:17.000000000 -0400
@@ -229,11 +229,15 @@
log.Log(lambda: "Renaming %s to %s" % (rp_source.path, rp_dest.path), 7)
if not rp_source.lstat(): rp_dest.delete()
else:
- if rp_dest.lstat() and rp_source.getinode() ==
rp_dest.getinode():
- log.Log("Warning: Attempt to rename over same inode: %s
to %s"
- % (rp_source.path, rp_dest.path), 2)
- # You can't rename one hard linked file over another
- rp_source.delete()
+ if rp_dest.lstat():
+ if rp_source.getinode() == rp_dest.getinode():
+ log.Log("Warning: Attempt to rename over same
inode: %s to %s"
+ % (rp_source.path,
rp_dest.path), 2)
+ # You can't rename one hard linked file over
another
+ rp_source.delete()
+ else:
+ rp_dest.delete()
+ rp_source.conn.os.rename(rp_source.path,
rp_dest.path)
else: rp_source.conn.os.rename(rp_source.path, rp_dest.path)
rp_dest.data = rp_source.data
rp_source.data = {'type': None}
- [rdiff-backup-users] [patch] rdiff-backup over encfs + sshfs fix,
Jon Kolb <=