compact.rst.inc 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_compact:
  3. borg compact
  4. ------------
  5. .. code-block:: none
  6. borg [common options] compact [options] [REPOSITORY]
  7. .. only:: html
  8. .. class:: borg-options-table
  9. +-------------------------------------------------------+-------------------------+----------------------------------------------------------------+
  10. | **positional arguments** |
  11. +-------------------------------------------------------+-------------------------+----------------------------------------------------------------+
  12. | | ``REPOSITORY`` | repository to compact |
  13. +-------------------------------------------------------+-------------------------+----------------------------------------------------------------+
  14. | **options** |
  15. +-------------------------------------------------------+-------------------------+----------------------------------------------------------------+
  16. | | ``-n``, ``--dry-run`` | do nothing |
  17. +-------------------------------------------------------+-------------------------+----------------------------------------------------------------+
  18. | | ``--cleanup-commits`` | cleanup commit-only 17-byte segment files |
  19. +-------------------------------------------------------+-------------------------+----------------------------------------------------------------+
  20. | | ``--threshold PERCENT`` | set minimum threshold for saved space in PERCENT (Default: 10) |
  21. +-------------------------------------------------------+-------------------------+----------------------------------------------------------------+
  22. | .. class:: borg-common-opt-ref |
  23. | |
  24. | :ref:`common_options` |
  25. +-------------------------------------------------------+-------------------------+----------------------------------------------------------------+
  26. .. raw:: html
  27. <script type='text/javascript'>
  28. $(document).ready(function () {
  29. $('.borg-options-table colgroup').remove();
  30. })
  31. </script>
  32. .. only:: latex
  33. REPOSITORY
  34. repository to compact
  35. options
  36. -n, --dry-run do nothing
  37. --cleanup-commits cleanup commit-only 17-byte segment files
  38. --threshold PERCENT set minimum threshold for saved space in PERCENT (Default: 10)
  39. :ref:`common_options`
  40. |
  41. Description
  42. ~~~~~~~~~~~
  43. This command frees repository space by compacting segments.
  44. Use this regularly to avoid running out of space - you do not need to use this
  45. after each borg command though. It is especially useful after deleting archives,
  46. because only compaction will really free repository space.
  47. borg compact does not need a key, so it is possible to invoke it from the
  48. client or also from the server.
  49. Depending on the amount of segments that need compaction, it may take a while,
  50. so consider using the ``--progress`` option.
  51. A segment is compacted if the amount of saved space is above the percentage value
  52. given by the ``--threshold`` option. If omitted, a threshold of 10% is used.
  53. When using ``--verbose``, borg will output an estimate of the freed space.
  54. After upgrading borg (server) to 1.2+, you can use ``borg compact --cleanup-commits``
  55. to clean up the numerous 17byte commit-only segments that borg 1.1 did not clean up
  56. due to a bug. It is enough to do that once per repository. After cleaning up the
  57. commits, borg will also do a normal compaction.
  58. See :ref:`separate_compaction` in Additional Notes for more details.