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"
_______________________________________________ rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki