Commit feeb6c9e authored by bescoto's avatar bescoto

Added --no-change-dir-inc-perms switch, fixed windows mode checkdest bug


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@343 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 9665f19d
New in v0.12.1 (2003/07/??)
---------------------------
Added --no-change-dir-inc-perms switch, to avoid some weird errors on
FreeBSD, and possibly on Solaris. Thanks to Troels Arvin for
report.
Fixed bug when regressing destination directory made with
--windows-mode. Reported by Tucker Sylvestro.
New in v0.12.0 (2003/06/26)
---------------------------
......
......@@ -201,6 +201,11 @@ Do not create an rdiff-backup-data directory or make any increments.
In this mode rdiff-backup is similar to rsync (but usually
slower).
.TP
.B --no-change-dir-inc-perms
Do not change the permissions of the directory increments to match the
directories they represent. This option may be required on file
systems where regular files cannot have their sticky bit set.
.TP
.B --no-compare-inode
This relative esoteric option prevents rdiff-backup from flagging a
file as changed when its inode changes. This option may be useful if
......
......@@ -183,6 +183,11 @@ compare_inode = 1
# guarantee that any changes have been committed to disk.
fsync_directories = 1
# If set, directory increments are given the same permissions as the
# directories they represent. Otherwise they have the default
# permissions.
change_dir_inc_perms = 1
def get(name):
"""Return the value of something in this module"""
......
......@@ -52,15 +52,15 @@ def parse_cmdlineoptions(arglist):
"include=", "include-filelist=", "include-filelist-stdin",
"include-globbing-filelist=", "include-regexp=",
"list-at-time=", "list-changed-since=", "list-increments",
"no-compare-inode", "no-compression",
"no-compression-regexp=", "no-file-statistics",
"no-hard-links", "null-separator", "parsable-output",
"print-statistics", "quoting-char=", "remote-cmd=",
"remote-schema=", "remove-older-than=", "restore-as-of=",
"restrict=", "restrict-read-only=", "restrict-update-only=",
"server", "ssh-no-compression", "terminal-verbosity=",
"test-server", "verbosity=", "version", "windows-mode",
"windows-restore"])
"no-change-dir-inc-perms", "no-compare-inode",
"no-compression", "no-compression-regexp=",
"no-file-statistics", "no-hard-links", "null-separator",
"parsable-output", "print-statistics", "quoting-char=",
"remote-cmd=", "remote-schema=", "remove-older-than=",
"restore-as-of=", "restrict=", "restrict-read-only=",
"restrict-update-only=", "server", "ssh-no-compression",
"terminal-verbosity=", "test-server", "verbosity=",
"version", "windows-mode", "windows-restore"])
except getopt.error, e:
commandline_error("Bad commandline options: %s" % str(e))
......@@ -105,6 +105,8 @@ def parse_cmdlineoptions(arglist):
restore_timestr, action = arg, "list-changed-since"
elif opt == "-l" or opt == "--list-increments":
action = "list-increments"
elif opt == "--no-change-dir-inc-perms":
Globals.set("change_dir_inc_perms", 0)
elif opt == "--no-compare-inode": Globals.set("compare_inode", 0)
elif opt == "--no-compression": Globals.set("compression", None)
elif opt == "--no-compression-regexp":
......@@ -583,6 +585,8 @@ def ListAtTime(rp):
def CheckDest(dest_rp):
"""Check the destination directory, """
if Globals.quoting_enabled:
dest_rp = FilenameMapping.get_quotedrpath(dest_rp)
if Globals.rbdir is None:
SetConnections.UpdateGlobal('rbdir',
dest_rp.append_path("rdiff-backup-data"))
......
......@@ -87,7 +87,7 @@ def makedir(mirrordir, incpref):
"""Make file indicating directory mirrordir has changed"""
dirsign = get_inc(incpref, "dir")
dirsign.touch()
rpath.copy_attribs(mirrordir, dirsign)
if Globals.change_dir_inc_perms: rpath.copy_attribs(mirrordir, dirsign)
return dirsign
def get_inc(rp, typestr, time = None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment