compact.rst.inc 4.0 KB

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