recreate.rst.inc 4.3 KB

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