create.rst.inc 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_create:
  3. borg create
  4. -----------
  5. ::
  6. borg create <options> ARCHIVE PATH
  7. positional arguments
  8. ARCHIVE
  9. name of archive to create (must be also a valid directory name)
  10. PATH
  11. paths to archive
  12. optional arguments
  13. ``-n``, ``--dry-run``
  14. | do not create a backup archive
  15. ``-s``, ``--stats``
  16. | print statistics for the created archive
  17. ``-p``, ``--progress``
  18. | show progress display while creating the archive, showing Original, Compressed and Deduplicated sizes, followed by the Number of files seen and the path being processed, default: False
  19. ``--list``
  20. | output verbose list of items (files, dirs, ...)
  21. ``--filter STATUSCHARS``
  22. | only display items with the given status characters
  23. `Common options`_
  24. |
  25. Exclusion options
  26. ``-e PATTERN``, ``--exclude PATTERN``
  27. | exclude paths matching PATTERN
  28. ``--exclude-from EXCLUDEFILE``
  29. | read exclude patterns from EXCLUDEFILE, one per line
  30. ``--exclude-caches``
  31. | exclude directories that contain a CACHEDIR.TAG file (http://www.brynosaurus.com/cachedir/spec.html)
  32. ``--exclude-if-present NAME``
  33. | exclude directories that are tagged by containing a filesystem object with the given NAME
  34. ``--keep-exclude-tags``, ``--keep-tag-files``
  35. | keep tag objects (i.e.: arguments to --exclude-if-present) in otherwise excluded caches/directories
  36. Filesystem options
  37. ``-x``, ``--one-file-system``
  38. | stay in same file system, do not cross mount points
  39. ``--numeric-owner``
  40. | only store numeric user and group identifiers
  41. ``--noatime``
  42. | do not store atime into archive
  43. ``--noctime``
  44. | do not store ctime into archive
  45. ``--ignore-inode``
  46. | ignore inode data in the file metadata cache used to detect unchanged files.
  47. ``--read-special``
  48. | 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.
  49. Archive options
  50. ``--comment COMMENT``
  51. | add a comment text to the archive
  52. ``--timestamp TIMESTAMP``
  53. | manually specify the archive creation date/time (UTC, yyyy-mm-ddThh:mm:ss format). alternatively, give a reference file/directory.
  54. ``-c SECONDS``, ``--checkpoint-interval SECONDS``
  55. | write checkpoint every SECONDS seconds (Default: 1800)
  56. ``--chunker-params PARAMS``
  57. | specify the chunker parameters (CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE). default: 19,23,21,4095
  58. ``-C COMPRESSION``, ``--compression COMPRESSION``
  59. | select compression algorithm, see the output of the "borg help compression" command for details.
  60. ``--compression-from COMPRESSIONCONFIG``
  61. | read compression patterns from COMPRESSIONCONFIG, see the output of the "borg help compression" command for details.
  62. Description
  63. ~~~~~~~~~~~
  64. This command creates a backup archive containing all files found while recursively
  65. traversing all paths specified. When giving '-' as path, borg will read data
  66. from standard input and create a file 'stdin' in the created archive from that
  67. data.
  68. The archive will consume almost no disk space for files or parts of files that
  69. have already been stored in other archives.
  70. The archive name needs to be unique. It must not end in '.checkpoint' or
  71. '.checkpoint.N' (with N being a number), because these names are used for
  72. checkpoints and treated in special ways.
  73. In the archive name, you may use the following placeholders:
  74. {now}, {utcnow}, {fqdn}, {hostname}, {user} and some others.
  75. To speed up pulling backups over sshfs and similar network file systems which do
  76. not provide correct inode information the --ignore-inode flag can be used. This
  77. potentially decreases reliability of change detection, while avoiding always reading
  78. all files on these file systems.
  79. See the output of the "borg help patterns" command for more help on exclude patterns.
  80. See the output of the "borg help placeholders" command for more help on placeholders.
  81. .. man NOTES
  82. The --exclude patterns are not like tar. In tar --exclude .bundler/gems will
  83. exclude foo/.bundler/gems. In borg it will not, you need to use --exclude
  84. '\*/.bundler/gems' to get the same effect. See ``borg help patterns`` for
  85. more information.
  86. Item flags
  87. ++++++++++
  88. ``--list`` outputs a list of all files, directories and other
  89. file system items it considered (no matter whether they had content changes
  90. or not). For each item, it prefixes a single-letter flag that indicates type
  91. and/or status of the item.
  92. If you are interested only in a subset of that output, you can give e.g.
  93. ``--filter=AME`` and it will only show regular files with A, M or E status (see
  94. below).
  95. A uppercase character represents the status of a regular file relative to the
  96. "files" cache (not relative to the repo -- this is an issue if the files cache
  97. is not used). Metadata is stored in any case and for 'A' and 'M' also new data
  98. chunks are stored. For 'U' all data chunks refer to already existing chunks.
  99. - 'A' = regular file, added (see also :ref:`a_status_oddity` in the FAQ)
  100. - 'M' = regular file, modified
  101. - 'U' = regular file, unchanged
  102. - 'E' = regular file, an error happened while accessing/reading *this* file
  103. A lowercase character means a file type other than a regular file,
  104. borg usually just stores their metadata:
  105. - 'd' = directory
  106. - 'b' = block device
  107. - 'c' = char device
  108. - 'h' = regular file, hardlink (to already seen inodes)
  109. - 's' = symlink
  110. - 'f' = fifo
  111. Other flags used include:
  112. - 'i' = backup data was read from standard input (stdin)
  113. - '-' = dry run, item was *not* backed up
  114. - 'x' = excluded, item was *not* backed up
  115. - '?' = missing status code (if you see this, please file a bug report!)