[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[rdiff-backup-users] [PATCH] Make --exclude-other-filesystems include th
From: |
Jakob Unterwurzacher |
Subject: |
[rdiff-backup-users] [PATCH] Make --exclude-other-filesystems include the mountpoint |
Date: |
Mon, 04 Jan 2010 01:55:01 +0100 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090817) |
rdiff-backup --exclude-other-file-systems will not include the (empty)
mountpoint directories.
Having the mountpoints in the backup is useful (a restored linux root file
system without /proc, /dev, /home etc. will give you some trouble) and also the
normal behaviour of rsync --one-file-system.
This simple patch makes rdiff-backup --exclude-other-file-systems include the
mountpoints in the backup.
This discussion on the list brought up the issue:
http://thread.gmane.org/gmane.comp.sysutils.backup.rdiff-backup.general/6442
The patch is against selection.py - on Debian, Ubuntu this is
/usr/share/pyshared/rdiff_backup/selection.py .
Jakob
---
diff --git a/selection.py b/selection.py
index b2975ee..90831a3 100644
--- a/selection.py
+++ b/selection.py
@@ -451,7 +451,9 @@ probably isn't what you meant.""" %
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"
diff --git a/selection.py b/selection.py
index b2975ee..90831a3 100644
--- a/selection.py
+++ b/selection.py
@@ -451,7 +451,9 @@ probably isn't what you meant.""" %
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"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [rdiff-backup-users] [PATCH] Make --exclude-other-filesystems include the mountpoint,
Jakob Unterwurzacher <=