recreate.rst.inc 4.0 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 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. ``-c SECONDS``, ``--checkpoint-interval SECONDS``
  40. | write checkpoint every SECONDS seconds (Default: 1800)
  41. ``--comment COMMENT``
  42. | add a comment text to the archive
  43. ``--timestamp yyyy-mm-ddThh:mm:ss``
  44. | manually specify the archive creation date/time (UTC). alternatively, give a reference file/directory.
  45. ``-C COMPRESSION``, ``--compression COMPRESSION``
  46. | select compression algorithm, see the output of the "borg help compression" command for details.
  47. ``--always-recompress``
  48. | always recompress chunks, don't skip chunks already compressed with the same algorithm.
  49. ``--compression-from COMPRESSIONCONFIG``
  50. | read compression patterns from COMPRESSIONCONFIG, see the output of the "borg help compression" command for details.
  51. ``--chunker-params CHUNK_MIN_EXP,CHUNK_MAX_EXP,HASH_MASK_BITS,HASH_WINDOW_SIZE``
  52. | specify the chunker parameters (or "default").
  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 and PATH have the exact same semantics
  58. as in "borg create". If PATHs are specified the resulting archive
  59. 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, --compression-from, PATHs).
  62. --compression: all chunks seen will be stored using the given method.
  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.