recreate.rst.inc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_recreate:
  3. borg recreate
  4. -------------
  5. ::
  6. borg recreate <options> REPOSITORY_OR_ARCHIVE PATH
  7. positional arguments
  8. REPOSITORY_OR_ARCHIVE
  9. repository/archive to recreate
  10. PATH
  11. paths to recreate; patterns are supported
  12. optional arguments
  13. ``--list``
  14. | output verbose list of items (files, dirs, ...)
  15. ``--filter STATUSCHARS``
  16. | only display items with the given status characters
  17. ``-p``, ``--progress``
  18. | show progress display while recreating archives
  19. ``-n``, ``--dry-run``
  20. | do not change anything
  21. ``-s``, ``--stats``
  22. | print statistics at end
  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 FILENAME``
  33. | exclude directories that contain the specified file
  34. ``--keep-tag-files``
  35. | keep tag files of excluded caches/directories
  36. Archive options
  37. ``--comment COMMENT``
  38. | add a comment text to the archive
  39. ``--timestamp yyyy-mm-ddThh:mm:ss``
  40. | manually specify the archive creation date/time (UTC). alternatively, give a reference file/directory.
  41. ``-C COMPRESSION``, ``--compression COMPRESSION``
  42. | select compression algorithm (and level):
  43. | none == no compression (default),
  44. | auto,C[,L] == built-in heuristic decides between none or C[,L] - with C[,L]
  45. | being any valid compression algorithm (and optional level),
  46. | lz4 == lz4,
  47. | zlib == zlib (default level 6),
  48. | zlib,0 .. zlib,9 == zlib (with level 0..9),
  49. | lzma == lzma (default level 6),
  50. | lzma,0 .. lzma,9 == lzma (with level 0..9).
  51. ``--compression-from COMPRESSIONCONFIG``
  52. | read compression patterns from COMPRESSIONCONFIG, one per line
  53. ``--chunker-params CHUNK_MIN_EXP,CHUNK_MAX_EXP,HASH_MASK_BITS,HASH_WINDOW_SIZE``
  54. | specify the chunker parameters (or "default").
  55. Description
  56. ~~~~~~~~~~~
  57. Recreate the contents of existing archives.
  58. --exclude, --exclude-from and PATH have the exact same semantics
  59. as in "borg create". If PATHs are specified the resulting archive
  60. will only contain files from these PATHs.
  61. --compression: all chunks seen will be stored using the given method.
  62. Due to how Borg stores compressed size information this might display
  63. incorrect information for archives that were not recreated at the same time.
  64. There is no risk of data loss by this.
  65. --chunker-params will re-chunk all files in the archive, this can be
  66. used to have upgraded Borg 0.xx or Attic archives deduplicate with
  67. Borg 1.x archives.
  68. borg recreate is signal safe. Send either SIGINT (Ctrl-C on most terminals) or
  69. SIGTERM to request termination.
  70. Use the *exact same* command line to resume the operation later - changing excludes
  71. or paths will lead to inconsistencies (changed excludes will only apply to newly
  72. processed files/dirs). Changing compression leads to incorrect size information
  73. (which does not cause any data loss, but can be misleading).
  74. Changing chunker params between invocations might lead to data loss.
  75. USE WITH CAUTION.
  76. Depending on the PATHs and patterns given, recreate can be used to permanently
  77. delete files from archives.
  78. When in doubt, use "--dry-run --verbose --list" to see how patterns/PATHS are
  79. interpreted.
  80. The archive being recreated is only removed after the operation completes. The
  81. archive that is built during the operation exists at the same time at
  82. "<ARCHIVE>.recreate". The new archive will have a different archive ID.
  83. When rechunking space usage can be substantial, expect at least the entire
  84. deduplicated size of the archives using the previous chunker params.
  85. When recompressing approximately 1 % of the repository size or 512 MB
  86. (whichever is greater) of additional space is used.