|
@@ -12,85 +12,91 @@ borg create
|
|
|
|
|
|
.. class:: borg-options-table
|
|
|
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | **positional arguments** |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``ARCHIVE`` | name of archive to create (must be also a valid directory name) |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``PATH`` | paths to archive |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | **optional arguments** |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-n``, ``--dry-run`` | do not create a backup archive |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-s``, ``--stats`` | print statistics for the created archive |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--list`` | output verbose list of items (files, dirs, ...) |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--filter STATUSCHARS`` | only display items with the given status characters (see description) |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--json`` | output stats as JSON. Implies ``--stats``. |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--no-cache-sync`` | experimental: do not synchronize the cache. Implies not using the files cache. |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--no-files-cache`` | do not load/update the file metadata cache used to detect unchanged files |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--stdin-name NAME`` | use NAME in archive for stdin data (default: "stdin") |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | .. class:: borg-common-opt-ref |
|
|
|
- | |
|
|
|
- | :ref:`common_options` |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | **Exclusion options** |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-e PATTERN``, ``--exclude PATTERN`` | exclude paths matching PATTERN |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--exclude-from EXCLUDEFILE`` | read exclude patterns from EXCLUDEFILE, one per line |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--pattern PATTERN`` | experimental: include/exclude paths matching PATTERN |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--patterns-from PATTERNFILE`` | experimental: read include/exclude patterns from PATTERNFILE, one per line |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--exclude-caches`` | exclude directories that contain a CACHEDIR.TAG file (http://www.bford.info/cachedir/spec.html) |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--exclude-if-present NAME`` | exclude directories that are tagged by containing a filesystem object with the given NAME |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--keep-exclude-tags``, ``--keep-tag-files`` | if tag objects are specified with ``--exclude-if-present``, don't omit the tag objects themselves from the backup archive |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--exclude-nodump`` | exclude files flagged NODUMP |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | **Filesystem options** |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-x``, ``--one-file-system`` | stay in the same file system and do not store mount points of other file systems |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--numeric-owner`` | only store numeric user and group identifiers |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--noatime`` | do not store atime into archive |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--noctime`` | do not store ctime into archive |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--nobirthtime`` | do not store birthtime (creation date) into archive |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--nobsdflags`` | do not read and store bsdflags (e.g. NODUMP, IMMUTABLE) into archive |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--ignore-inode`` | ignore inode data in the file metadata cache used to detect unchanged files. |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--files-cache MODE`` | operate files cache in MODE. default: ctime,size,inode |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--read-special`` | open and read block and char device files as well as FIFOs as if they were regular files. Also follows symlinks pointing to these kinds of files. |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | **Archive options** |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--comment COMMENT`` | add a comment text to the archive |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--timestamp TIMESTAMP`` | manually specify the archive creation date/time (UTC, yyyy-mm-ddThh:mm:ss format). Alternatively, give a reference file/directory. |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-c SECONDS``, ``--checkpoint-interval SECONDS`` | write checkpoint every SECONDS seconds (Default: 1800) |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--chunker-params PARAMS`` | specify the chunker parameters (CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE). default: 19,23,21,4095 |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-C COMPRESSION``, ``--compression COMPRESSION`` | select compression algorithm, see the output of the "borg help compression" command for details. |
|
|
|
- +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | **positional arguments** |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``ARCHIVE`` | name of archive to create (must be also a valid directory name) |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``PATH`` | paths to archive |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | **optional arguments** |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-n``, ``--dry-run`` | do not create a backup archive |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-s``, ``--stats`` | print statistics for the created archive |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--list`` | output verbose list of items (files, dirs, ...) |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--filter STATUSCHARS`` | only display items with the given status characters (see description) |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--json`` | output stats as JSON. Implies ``--stats``. |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--no-cache-sync`` | experimental: do not synchronize the cache. Implies not using the files cache. |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--no-files-cache`` | do not load/update the file metadata cache used to detect unchanged files |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--stdin-name NAME`` | use NAME in archive for stdin data (default: "stdin") |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--stdin-user USER`` | set user USER in archive for stdin data (default: 'root') |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--stdin-group GROUP`` | set group GROUP in archive for stdin data (default: 'root') |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--stdin-mode M`` | set mode to M in archive for stdin data (default: 0660) |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | .. class:: borg-common-opt-ref |
|
|
|
+ | |
|
|
|
+ | :ref:`common_options` |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | **Exclusion options** |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-e PATTERN``, ``--exclude PATTERN`` | exclude paths matching PATTERN |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--exclude-from EXCLUDEFILE`` | read exclude patterns from EXCLUDEFILE, one per line |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--pattern PATTERN`` | experimental: include/exclude paths matching PATTERN |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--patterns-from PATTERNFILE`` | experimental: read include/exclude patterns from PATTERNFILE, one per line |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--exclude-caches`` | exclude directories that contain a CACHEDIR.TAG file (http://www.bford.info/cachedir/spec.html) |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--exclude-if-present NAME`` | exclude directories that are tagged by containing a filesystem object with the given NAME |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--keep-exclude-tags``, ``--keep-tag-files`` | if tag objects are specified with ``--exclude-if-present``, don't omit the tag objects themselves from the backup archive |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--exclude-nodump`` | exclude files flagged NODUMP |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | **Filesystem options** |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-x``, ``--one-file-system`` | 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. |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--numeric-owner`` | only store numeric user and group identifiers |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--noatime`` | do not store atime into archive |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--noctime`` | do not store ctime into archive |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--nobirthtime`` | do not store birthtime (creation date) into archive |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--nobsdflags`` | do not read and store bsdflags (e.g. NODUMP, IMMUTABLE) into archive |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--ignore-inode`` | ignore inode data in the file metadata cache used to detect unchanged files. |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--files-cache MODE`` | operate files cache in MODE. default: ctime,size,inode |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--read-special`` | open and read block and char device files as well as FIFOs as if they were regular files. Also follows symlinks pointing to these kinds of files. |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | **Archive options** |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--comment COMMENT`` | add a comment text to the archive |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--timestamp TIMESTAMP`` | manually specify the archive creation date/time (UTC, yyyy-mm-ddThh:mm:ss format). Alternatively, give a reference file/directory. |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-c SECONDS``, ``--checkpoint-interval SECONDS`` | write checkpoint every SECONDS seconds (Default: 1800) |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--chunker-params PARAMS`` | specify the chunker parameters (CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE). default: 19,23,21,4095 |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-C COMPRESSION``, ``--compression COMPRESSION`` | select compression algorithm, see the output of the "borg help compression" command for details. |
|
|
|
+ +-------------------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
|
|
.. raw:: html
|
|
|
|
|
@@ -117,6 +123,9 @@ borg create
|
|
|
--no-cache-sync experimental: do not synchronize the cache. Implies not using the files cache.
|
|
|
--no-files-cache do not load/update the file metadata cache used to detect unchanged files
|
|
|
--stdin-name NAME use NAME in archive for stdin data (default: "stdin")
|
|
|
+ --stdin-user USER set user USER in archive for stdin data (default: 'root')
|
|
|
+ --stdin-group GROUP set group GROUP in archive for stdin data (default: 'root')
|
|
|
+ --stdin-mode M set mode to M in archive for stdin data (default: 0660)
|
|
|
|
|
|
|
|
|
:ref:`common_options`
|
|
@@ -134,7 +143,7 @@ borg create
|
|
|
|
|
|
|
|
|
Filesystem options
|
|
|
- -x, --one-file-system stay in the same file system and do not store mount points of other file systems
|
|
|
+ -x, --one-file-system 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.
|
|
|
--numeric-owner only store numeric user and group identifiers
|
|
|
--noatime do not store atime into archive
|
|
|
--noctime do not store ctime into archive
|
|
@@ -227,6 +236,7 @@ the state after creation. Also, the ``--stats`` and ``--dry-run`` options are mu
|
|
|
exclusive because the data is not actually compressed and deduplicated during a dry run.
|
|
|
|
|
|
See the output of the "borg help patterns" command for more help on exclude patterns.
|
|
|
+
|
|
|
See the output of the "borg help placeholders" command for more help on placeholders.
|
|
|
|
|
|
.. man NOTES
|
|
@@ -245,6 +255,18 @@ only include the objects specified by ``--exclude-if-present`` in your backup,
|
|
|
and not include any other contents of the containing folder, this can be enabled
|
|
|
through using the ``--keep-exclude-tags`` option.
|
|
|
|
|
|
+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.
|
|
|
+
|
|
|
+
|
|
|
.. _list_item_flags:
|
|
|
|
|
|
Item flags
|