diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-12-29 17:09:20 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-12-29 17:09:20 +0200 |
commit | 89999c0eec3323341d2d7adc13b5c11df7c7866f (patch) | |
tree | 23e4b4150dbd3e8e6a69ddeee5dc5e62458a9bb5 | |
parent | c4217e315ced46590f67d3e09d20e27a5ea0cd0b (diff) | |
download | obnam-89999c0eec3323341d2d7adc13b5c11df7c7866f.tar.gz |
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.
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | obnamlib/plugins/one_file_system_plugin.py | 7 |
3 files changed, 8 insertions, 1 deletions
@@ -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 <liw@liw.fi> 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 |