From 89999c0eec3323341d2d7adc13b5c11df7c7866f Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 29 Dec 2016 17:09:20 +0200 Subject: Fix --one-filesystem Something broke --one-filesystem, at least for some people, when Obnam learnt to detect bind mounts. This change reverts that functionality, rather then fixing the bug. Thus: no bind mount detection, go back to previous functionality. This is fairly urgent due to an upcoming Debian release and it's ongoing freeze. A proper fix and re-adding the bind mount detection to be added later. --- NEWS | 1 + debian/changelog | 1 + obnamlib/plugins/one_file_system_plugin.py | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 2daa1f07..720aeb7d 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ warning. DO NOT USE it unless you're willing to lose your backup. Version 1.20.3+git, not yet released ------------------------------------ +* Disable bind-mount detection for `--one-filesystem`. Version 1.20.3, released 2016-12-15 ------------------------------------ diff --git a/debian/changelog b/debian/changelog index 7f12645e..cb302026 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ obnam (1.20.3+git-1) UNRELEASED; urgency=medium * New upstream version. + - Fix --one-filesystem bug (Closes: #849596) -- Lars Wirzenius Thu, 15 Dec 2016 11:19:43 +0100 diff --git a/obnamlib/plugins/one_file_system_plugin.py b/obnamlib/plugins/one_file_system_plugin.py index 726b3ed2..8de3ae98 100644 --- a/obnamlib/plugins/one_file_system_plugin.py +++ b/obnamlib/plugins/one_file_system_plugin.py @@ -57,6 +57,11 @@ class OneFileSystemPlugin(obnamlib.ObnamPlugin): pathname = kwargs['pathname'] exclude = kwargs['exclude'] - if st.st_dev != root_metadata.st_dev or pathname in self.mount_points: + # FIXME: We should check for mount points (bind mounts) here. + # We used to do that but it broke other things, and as the + # Debian stretch release freezing is going on, backing out of + # the bind mount checking is a safer bet than trying to fix + # it. Needs to be fixed later. I suck. --liw + if st.st_dev != root_metadata.st_dev: logging.debug('Excluding (one-file-system): %s', pathname) exclude[0] = True -- cgit v1.2.1