recreate.rst.inc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. ``--target TARGET``
  38. | create a new archive with the name ARCHIVE, do not replace existing archive (only applies for a single archive)
  39. ``--comment COMMENT``
  40. | add a comment text to the archive
  41. ``--timestamp yyyy-mm-ddThh:mm:ss``
  42. | manually specify the archive creation date/time (UTC). alternatively, give a reference file/directory.
  43. ``-C COMPRESSION``, ``--compression COMPRESSION``
  44. | select compression algorithm (and level):
  45. | none == no compression (default),
  46. | auto,C[,L] == built-in heuristic decides between none or C[,L] - with C[,L]
  47. | being any valid compression algorithm (and optional level),
  48. | lz4 == lz4,
  49. | zlib == zlib (default level 6),
  50. | zlib,0 .. zlib,9 == zlib (with level 0..9),
  51. | lzma == lzma (default level 6),
  52. | lzma,0 .. lzma,9 == lzma (with level 0..9).
  53. ``--always-recompress``
  54. | always recompress chunks, don't skip chunks already compressed with the samealgorithm.
  55. ``--compression-from COMPRESSIONCONFIG``
  56. | read compression patterns from COMPRESSIONCONFIG, one per line
  57. ``--chunker-params CHUNK_MIN_EXP,CHUNK_MAX_EXP,HASH_MASK_BITS,HASH_WINDOW_SIZE``
  58. | specify the chunker parameters (or "default").
  59. Description
  60. ~~~~~~~~~~~
  61. Recreate the contents of existing archives.
  62. --exclude, --exclude-from and PATH have the exact same semantics
  63. as in "borg create". If PATHs are specified the resulting archive
  64. will only contain files from these PATHs.
  65. Note that all paths in an archive are relative, therefore absolute patterns/paths
  66. will *not* match (--exclude, --exclude-from, --compression-from, PATHs).
  67. --compression: all chunks seen will be stored using the given method.
  68. Due to how Borg stores compressed size information this might display
  69. incorrect information for archives that were not recreated at the same time.
  70. There is no risk of data loss by this.
  71. --chunker-params will re-chunk all files in the archive, this can be
  72. used to have upgraded Borg 0.xx or Attic archives deduplicate with
  73. Borg 1.x archives.
  74. borg recreate is signal safe. Send either SIGINT (Ctrl-C on most terminals) or
  75. SIGTERM to request termination.
  76. Use the *exact same* command line to resume the operation later - changing excludes
  77. or paths will lead to inconsistencies (changed excludes will only apply to newly
  78. processed files/dirs). Changing compression leads to incorrect size information
  79. (which does not cause any data loss, but can be misleading).
  80. Changing chunker params between invocations might lead to data loss.
  81. USE WITH CAUTION.
  82. Depending on the PATHs and patterns given, recreate can be used to permanently
  83. delete files from archives.
  84. When in doubt, use "--dry-run --verbose --list" to see how patterns/PATHS are
  85. interpreted.
  86. The archive being recreated is only removed after the operation completes. The
  87. archive that is built during the operation exists at the same time at
  88. "<ARCHIVE>.recreate". The new archive will have a different archive ID.
  89. With --target the original archive is not replaced, instead a new archive is created.
  90. When rechunking space usage can be substantial, expect at least the entire
  91. deduplicated size of the archives using the previous chunker params.
  92. When recompressing approximately 1 % of the repository size or 512 MB
  93. (whichever is greater) of additional space is used.