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