Package: rdiff-backup
Version: 1.2.8-5
Severity: normal
Tags: patch
Hi,
This discussion on [1] brought up the issue.
rdiff-backup --exclude-other-file-systems even excludes the directory of the
mountpoint. This is both troublesome and wrong:
- restoring a system backup without /dev, /proc, /sys, $(some others)
directories
is nothing nice to think about...
- the empty mountpoint directory itself *is* part of the filesystem which is
being
backed up.
The attached dpatch fixes this nicely. It originates from [2], written by [3].
[1] http://thread.gmane.org/gmane.comp.sysutils.backup.rdiff-backup.general/6442
[2] http://thread.gmane.org/gmane.comp.sysutils.backup.rdiff-backup.general/6452
[3] Jakob Unterwurzacher
Regards,
Daniel
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-dhr (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF8, LC_CTYPE=en_US.UTF8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages rdiff-backup depends on:
ii libc6 2.10.2-2 GNU C Library: Shared libraries
ii librsync1 0.9.7-7rsync remote-delta algorithm libra
ii python2.5.4-5An interactive high-level object-o
ii python-support1.0.6 automated rebuilding support for P
Versions of packages rdiff-backup recommends:
ii python-pylibacl 0.4.0-3module for manipulating POSIX.1e A
ii python-pyxattr0.4.0-2module for manipulating filesystem
rdiff-backup suggests no packages.
-- no debconf information
#! /bin/sh /usr/share/dpatch/dpatch-run
## 99-unnamed.dpatch by Daniel Reichelt
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad rdiff-backup-1.2.8~/rdiff_backup/selection.py rdiff-backup-1.2.8/rdiff_backup/selection.py
--- rdiff-backup-1.2.8~/rdiff_backup/selection.py 2009-03-16 15:36:21.0 +0100
+++ rdiff-backup-1.2.8/rdiff_backup/selection.py 2010-01-04 10:27:33.465610205 +0100
@@ -451,7 +451,9 @@
assert include == 0 or include == 1
root_devloc = self.rpath.getdevloc()
def sel_func(rp):
- if rp.getdevloc() == root_devloc: return None
+ if rp.getdevloc() == root_devloc or \
+rp.isdir() and rp.get_parent_rp().getdevloc() == root_devloc:
+return None
else: return include
sel_func.exclude = not include
sel_func.name = "Match other filesystems"