From c7d46be1a1a152baff70500448c6263dd2246a59 Mon Sep 17 00:00:00 2001 From: bescoto Date: Fri, 4 Apr 2003 00:52:34 +0000 Subject: --windows-mode no longer fsync's directories git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@312 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 4 ++-- rdiff-backup/rdiff-backup.1 | 9 +++++---- rdiff-backup/rdiff_backup/Globals.py | 4 ++++ rdiff-backup/rdiff_backup/Main.py | 1 + rdiff-backup/rdiff_backup/rpath.py | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index e2a7336..9e03576 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -6,8 +6,8 @@ Kempe for report.) Added --list-at-time option at request of Farkas Levente. -Don't change ownership if --windows-mode option is given. (Bug report -by Keith Edmunds.) +Various fixes for backing up onto windows directories. Thanks to +Keith Edmunds for bug reports and testing. New in v0.11.4 (2003/03/15) diff --git a/rdiff-backup/rdiff-backup.1 b/rdiff-backup/rdiff-backup.1 index 7aed792..a24a8ba 100644 --- a/rdiff-backup/rdiff-backup.1 +++ b/rdiff-backup/rdiff-backup.1 @@ -888,10 +888,11 @@ Files whose names are close to the maximum length (e.g. 235 chars if the maximum is 255) may be skipped because the filenames of related increment files would be too long. .PP -The gzip library in some versions of python have trouble producing -files over 2GB in length. This bug will prevent rdiff-backup from -producing large compressed increments (snapshots or diffs). A -workaround is to disable compression for large uncompressable files. +The gzip library in versions 2.2 and earlier of python have trouble +producing files over 2GB in length. This bug will prevent +rdiff-backup from producing large compressed increments (snapshots or +diffs). A workaround is to disable compression for large +uncompressable files. .SH AUTHOR Ben Escoto diff --git a/rdiff-backup/rdiff_backup/Globals.py b/rdiff-backup/rdiff_backup/Globals.py index 396ab3b..2516c13 100644 --- a/rdiff-backup/rdiff_backup/Globals.py +++ b/rdiff-backup/rdiff_backup/Globals.py @@ -176,6 +176,10 @@ restrict_path = None # the man page under --no-compare-inode for more information. compare_inode = 1 +# If set, directories can be fsync'd just like normal files, to +# guarantee that any changes have been committed to disk. +fsync_directories = 1 + def get(name): """Return the value of something in this module""" diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index 76527ce..c717f05 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -149,6 +149,7 @@ def parse_cmdlineoptions(arglist): Globals.set('quoting_enabled', 1) Globals.set('preserve_hardlinks', 0) Globals.set('change_ownership', 0) + Globals.set('fsync_directories', 0) else: Log.FatalError("Unknown option %s" % opt) def isincfilename(path): diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index f133eb6..8c9aa10 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -908,7 +908,7 @@ class RPath(RORPath): def fsync_with_dir(self, fp = None): """fsync self and directory self is under""" self.fsync(fp) - self.get_parent_rp().fsync() + if Globals.fsync_directories: self.get_parent_rp().fsync() def sync_delete(self): """Delete self with sync to guarantee completion -- cgit v1.2.1