compact.rst.inc 3.4 KB

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