From 9797f506eaeb46ded4a431ee4836dd23d9b851a8 Mon Sep 17 00:00:00 2001 From: bescoto Date: Tue, 5 Aug 2003 00:08:50 +0000 Subject: mostly updates for python 2.3 git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/branches/r0-12@374 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 3 ++- rdiff-backup/FAQ-body.html | 45 +++++++++++++++++++++++++++----------- rdiff-backup/TODO | 1 + rdiff-backup/rdiff_backup/rpath.py | 12 ++++++---- 4 files changed, 43 insertions(+), 18 deletions(-) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 3f5ce7f..03640c2 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -7,7 +7,8 @@ Patch by Jeffrey Marshall fixes socket/fifo recognition on Mac OS X Patch by Jeffrey Marshall fixes --calculate-average mode, which seems to have broken recently. -rdiff-backup should now work with python 2.3. +rdiff-backup should now work with python 2.3. Thanks to Arkadiusz +Miskiewicz for bug reports. New in v0.12.2 (2003/07/24) diff --git a/rdiff-backup/FAQ-body.html b/rdiff-backup/FAQ-body.html index 076c107..9c4db26 100644 --- a/rdiff-backup/FAQ-body.html +++ b/rdiff-backup/FAQ-body.html @@ -26,6 +26,7 @@ bandwidth usage, as in rsync's --bwlimit option?
  • How much memory should rdiff-backup use? Is there a memory leak?
  • +
  • I use NFS and keep getting some error that includes "OSError: [Errno 39] Directory not empty"
  • Questions and Answers

    @@ -174,13 +175,10 @@ Next time you back up, you run so that /usr/local is no longer copied to /backup/usr/local. However, old information about /usr/local is still present in -/backup/rdiff-backup-data/increments/usr/local. You could wait for -this information to expire and then run rdiff-backup with the ---remove-older-than option, or you could remove the increments -manually by typing: -
    rm -rf /backup/rdiff-backup-data/increments/usr/local
    -rm /backup/rdiff-backup-data/increments/usr/local.*.dir
    - +/backup/rdiff-backup-data/increments/usr/local. You can try to +manually remove this old information, but it's safer to let it be +removed by rdiff-backup when you run it with the --remove-older-than +option.

    @@ -235,11 +233,10 @@ the total number of files. Initial mirrorings will usually be bandwidth or disk bound, and will take much longer than subsequent updates. -

    To give two arbitrary data points, when I back up my personal HD -locally (about 9GB, 600000 files, maybe 50 MB turnover, 1.1Ghz athlon) -rdiff-backup takes about 35 minutes and is usually CPU bound. Another -user reports an rdiff-backup session takes about 3 hours (80GB, ~1mil -files, 2GB turnover) to back up remotely Tru64 -> linux. +

    To give one arbitrary data point, when I back up my personal HD +locally (about 36GB, 530000 files, maybe 500 MB turnover, athlon 2000, +7200 IDE disks, version 0.12.2) rdiff-backup takes about 15 minutes +and is usually CPU bound.

    @@ -348,7 +345,7 @@ rdiff-backup to exceed it for significant periods.

    Another option is to limit bandwidth at a lower (and perhaps more appropriate) level. Adam Lazur mentions The Wonder Shaper. +href="http://lartc.org/wondershaper/">The Wonder Shaper.

    @@ -366,5 +363,27 @@ leaks lots of memory. Version 0.9.5.1 should not leak and is available from the rdiff-backup homepage. + +
  • I use NFS and keep getting some error that includes "OSError: [Errno 39] Directory not empty" + +

    Several users have reported seeing errors that contain lines like +this: + +

    +File "/usr/lib/python2.2/site-packages/rdiff_backup/rpath.py",
    +    line 661, in rmdir
    +OSError: [Errno 39] Directory not empty:
    +    '/nfs/backup/redfish/win/Program Files/Common Files/GMT/Banners/11132'
    +Exception exceptions.TypeError: "'NoneType' object is not callable"
    +     in <bound method GzipFile.__del__ of
    +
    + +

    All of these users were backing up onto NFS (Network File System). +I think this is probably a bug in NFS, although tell me if you know +how to make rdiff-backup more NFS-friendly. To avoid this problem, +run rdiff-backup locally on both ends instead of over NFS. This +should be faster anyway. +

  • + diff --git a/rdiff-backup/TODO b/rdiff-backup/TODO index 54d091b..eb55646 100644 --- a/rdiff-backup/TODO +++ b/rdiff-backup/TODO @@ -1,3 +1,4 @@ +write test case for --calculate-statistics ---------[ Medium term ]--------------------------------------- diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index 3fe54f5..fdb698e 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -897,12 +897,16 @@ class RPath(RORPath): This can be useful for directories. """ - if not fp: - fp = self.open("rb") - os.fsync(fp.fileno()) - assert not fp.close() + if not fp: self.conn.rpath.RPath.fsync_local(self) else: os.fsync(fp.fileno()) + def fsync_local(self): + """fsync current file, run locally""" + assert self.conn is Globals.local_connection + fd = os.open(self.path, os.O_RDONLY) + os.fsync(fd) + os.close(fd) + def fsync_with_dir(self, fp = None): """fsync self and directory self is under""" self.fsync(fp) -- cgit v1.2.1