recreate.rst.inc 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 [common options] 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. ``-n``, ``--dry-run``
  18. | do not change anything
  19. ``-s``, ``--stats``
  20. | print statistics at end
  21. `Common options`_
  22. |
  23. Exclusion options
  24. ``-e PATTERN``, ``--exclude PATTERN``
  25. | exclude paths matching PATTERN
  26. ``--exclude-from EXCLUDEFILE``
  27. | read exclude patterns from EXCLUDEFILE, one per line
  28. ``--exclude-caches``
  29. | exclude directories that contain a CACHEDIR.TAG file (http://www.brynosaurus.com/cachedir/spec.html)
  30. ``--exclude-if-present NAME``
  31. | exclude directories that are tagged by containing a filesystem object with the given NAME
  32. ``--keep-exclude-tags``, ``--keep-tag-files``
  33. | if tag objects are specified with --exclude-if-present, don't omit the tag objects themselves from the backup archive
  34. ``--pattern PATTERN``
  35. | include/exclude paths matching PATTERN
  36. ``--patterns-from PATTERNFILE``
  37. | read include/exclude patterns from PATTERNFILE, one per line
  38. Archive options
  39. ``--target TARGET``
  40. | create a new archive with the name ARCHIVE, do not replace existing archive (only applies for a single archive)
  41. ``-c SECONDS``, ``--checkpoint-interval SECONDS``
  42. | write checkpoint every SECONDS seconds (Default: 1800)
  43. ``--comment COMMENT``
  44. | add a comment text to the archive
  45. ``--timestamp TIMESTAMP``
  46. | manually specify the archive creation date/time (UTC, yyyy-mm-ddThh:mm:ss format). alternatively, give a reference file/directory.
  47. ``-C COMPRESSION``, ``--compression COMPRESSION``
  48. | select compression algorithm, see the output of the "borg help compression" command for details.
  49. ``--recompress``
  50. | recompress data chunks according to --compression if "if-different". When "always", chunks that are already compressed that way are not skipped, but compressed again. Only the algorithm is considered for "if-different", not the compression level (if any).
  51. ``--chunker-params PARAMS``
  52. | specify the chunker parameters (CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE) or "default" to use the current defaults. default: 19,23,21,4095
  53. Description
  54. ~~~~~~~~~~~
  55. Recreate the contents of existing archives.
  56. This is an *experimental* feature. Do *not* use this on your only backup.
  57. --exclude, --exclude-from, --exclude-if-present, --keep-exclude-tags, and PATH
  58. have the exact same semantics as in "borg create". If PATHs are specified the
  59. resulting archive will only contain files from these PATHs.
  60. Note that all paths in an archive are relative, therefore absolute patterns/paths
  61. will *not* match (--exclude, --exclude-from, PATHs).
  62. --recompress allows to change the compression of existing data in archives.
  63. Due to how Borg stores compressed size information this might display
  64. incorrect information for archives that were not recreated at the same time.
  65. There is no risk of data loss by this.
  66. --chunker-params will re-chunk all files in the archive, this can be
  67. used to have upgraded Borg 0.xx or Attic archives deduplicate with
  68. Borg 1.x archives.
  69. USE WITH CAUTION.
  70. Depending on the PATHs and patterns given, recreate can be used to permanently
  71. delete files from archives.
  72. When in doubt, use "--dry-run --verbose --list" to see how patterns/PATHS are
  73. interpreted.
  74. The archive being recreated is only removed after the operation completes. The
  75. archive that is built during the operation exists at the same time at
  76. "<ARCHIVE>.recreate". The new archive will have a different archive ID.
  77. With --target the original archive is not replaced, instead a new archive is created.
  78. When rechunking space usage can be substantial, expect at least the entire
  79. deduplicated size of the archives using the previous chunker params.
  80. When recompressing expect approx. (throughput / checkpoint-interval) in space usage,
  81. assuming all chunks are recompressed.