From 58785f912646aa71efd9ad618731292488e29a10 Mon Sep 17 00:00:00 2001 From: bescoto Date: Mon, 4 Aug 2003 23:59:16 +0000 Subject: Mainly updates for python 2.3 git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@373 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 3 ++- rdiff-backup/FAQ-body.html | 45 +++++++++++++++++++++++++++----------- rdiff-backup/TODO | 2 ++ rdiff-backup/rdiff_backup/rpath.py | 12 ++++++---- 4 files changed, 44 insertions(+), 18 deletions(-) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 94b0a0e..460c05f 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -16,7 +16,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.13.0 (2003/07/22) diff --git a/rdiff-backup/FAQ-body.html b/rdiff-backup/FAQ-body.html index ece68be..6e73f85 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 8a8c3c8..1ab0aeb 100644 --- a/rdiff-backup/TODO +++ b/rdiff-backup/TODO @@ -1,3 +1,5 @@ +write test case for --calculate-statistics + Fix for Python 2.3 Change for librsync 0.9.6 when it comes out diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index a04f2ed..f695d5c 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -954,12 +954,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