From da6a34e0448bf3635acbd01b5fe221f560d184c0 Mon Sep 17 00:00:00 2001 From: NoNE Date: Fri, 21 Aug 2020 18:10:02 +0200 Subject: [PATCH] doc: Add more explanation for --one-file-system option --- doc/040_backup.rst | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/doc/040_backup.rst b/doc/040_backup.rst index 762c63376..1a2023cf3 100644 --- a/doc/040_backup.rst +++ b/doc/040_backup.rst @@ -213,13 +213,29 @@ On most Unixy shells, you can either quote or use backslashes. For example: By specifying the option ``--one-file-system`` you can instruct restic to only backup files from the file systems the initially specified files -or directories reside on. For example, calling restic like this won't -backup ``/sys`` or ``/dev`` on a Linux system: +or directories reside on. In other words, it will prevent restic from crossing +filesystem boundaries when performing a backup. + +For example, if you backup ``/`` with this option and you have external +media mounted under ``/media/usb`` then restic will not back up ``/media/usb`` +at all because this is a different filesystem than ``/``. Virtual filesystems +such as ``/proc`` are also considered different and thereby excluded when +using ``--one-file-system``: .. code-block:: console $ restic -r /srv/restic-repo backup --one-file-system / +Please note that this does not prevent you from specifying multiple filesystems +on the command line, e.g: + +.. code-block:: console + + $ restic -r /srv/restic-repo backup --one-file-system / /media/usb + +will back up both the ``/`` and ``/media/usb`` filesystems, but will not +include other filesystems like ``/sys`` and ``/proc``. + .. note:: ``--one-file-system`` is currently unsupported on Windows, and will cause the backup to immediately fail with an error.