From 6ca1ed9716d87ca3a419972f723a977ee585a10c Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 2 Apr 2023 14:30:53 +0200 Subject: [PATCH 1/2] improve --one-file-system help string, fixes #5618 --- src/borg/archiver/create_cmd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/borg/archiver/create_cmd.py b/src/borg/archiver/create_cmd.py index 773632be6..7912314a5 100644 --- a/src/borg/archiver/create_cmd.py +++ b/src/borg/archiver/create_cmd.py @@ -819,7 +819,8 @@ def build_parser_create(self, subparsers, common_parser, mid_common_parser): "--one-file-system", dest="one_file_system", action="store_true", - help="stay in the same file system and do not store mount points of other file systems. This might behave different from your expectations, see the docs.", + help="stay in the same file system and do not store mount points of other file systems - " + "this might behave different from your expectations, see the description below.", ) fs_group.add_argument( "--numeric-ids", From b7adee65bd6301ee9f4a7c2cd0aab9d823b08123 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 2 Apr 2023 15:31:37 +0200 Subject: [PATCH 2/2] --one-file-system: add macOS apfs notes, fixes #4876 --- src/borg/archiver/create_cmd.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/borg/archiver/create_cmd.py b/src/borg/archiver/create_cmd.py index 7912314a5..93f931076 100644 --- a/src/borg/archiver/create_cmd.py +++ b/src/borg/archiver/create_cmd.py @@ -635,13 +635,13 @@ def build_parser_create(self, subparsers, common_parser, mid_common_parser): The ``-x`` or ``--one-file-system`` option excludes directories, that are mountpoints (and everything in them). It detects mountpoints by comparing the device number from the output of ``stat()`` of the directory and its parent directory. Specifically, it excludes directories for which ``stat()`` reports a device number different - from the device number of their parent. Be aware that in Linux (and possibly elsewhere) there are directories - with device number different from their parent, which the kernel does not consider a mountpoint and also the - other way around. Examples are bind mounts (possibly same device number, but always a mountpoint) and ALL - subvolumes of a btrfs (different device number from parent but not necessarily a mountpoint). Therefore when - using ``--one-file-system``, one should make doubly sure that the backup works as intended especially when using - btrfs. This is even more important, if the btrfs layout was created by someone else, e.g. a distribution - installer. + from the device number of their parent. + In general: be aware that there are directories with device number different from their parent, which the kernel + does not consider a mountpoint and also the other way around. + Linux examples for this are bind mounts (possibly same device number, but always a mountpoint) and ALL + subvolumes of a btrfs (different device number from parent but not necessarily a mountpoint). + macOS examples are the apfs mounts of a typical macOS installation. + Therefore, when using ``--one-file-system``, you should double-check that the backup works as intended. .. _list_item_flags: