borg-compact.1 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .
  4. .nr rst2man-indent-level 0
  5. .
  6. .de1 rstReportMargin
  7. \\$1 \\n[an-margin]
  8. level \\n[rst2man-indent-level]
  9. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  10. -
  11. \\n[rst2man-indent0]
  12. \\n[rst2man-indent1]
  13. \\n[rst2man-indent2]
  14. ..
  15. .de1 INDENT
  16. .\" .rstReportMargin pre:
  17. . RS \\$1
  18. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  19. . nr rst2man-indent-level +1
  20. .\" .rstReportMargin post:
  21. ..
  22. .de UNINDENT
  23. . RE
  24. .\" indent \\n[an-margin]
  25. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  26. .nr rst2man-indent-level -1
  27. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  28. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  29. ..
  30. .TH "BORG-COMPACT" "1" "2025-04-18" "" "borg backup tool"
  31. .SH NAME
  32. borg-compact \- compact segment files in the repository
  33. .SH SYNOPSIS
  34. .sp
  35. borg [common options] compact [options] [REPOSITORY]
  36. .SH DESCRIPTION
  37. .sp
  38. This command frees repository space by compacting segments.
  39. .sp
  40. Use this regularly to avoid running out of space \- you do not need to use this
  41. after each borg command though. It is especially useful after deleting archives,
  42. because only compaction will really free repository space.
  43. .sp
  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. .sp
  47. Depending on the amount of segments that need compaction, it may take a while,
  48. so consider using the \fB\-\-progress\fP option.
  49. .sp
  50. A segment is compacted if the amount of saved space is above the percentage value
  51. given by the \fB\-\-threshold\fP option. If omitted, a threshold of 10% is used.
  52. When using \fB\-\-verbose\fP, borg will output an estimate of the freed space.
  53. .sp
  54. After upgrading borg (server) to 1.2+, you can use \fBborg compact \-\-cleanup\-commits\fP
  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. .sp
  59. See \fIseparate_compaction\fP in Additional Notes for more details.
  60. .SH OPTIONS
  61. .sp
  62. See \fIborg\-common(1)\fP for common options of Borg commands.
  63. .SS arguments
  64. .INDENT 0.0
  65. .TP
  66. .B REPOSITORY
  67. repository to compact
  68. .UNINDENT
  69. .SS options
  70. .INDENT 0.0
  71. .TP
  72. .B \-n\fP,\fB \-\-dry\-run
  73. do nothing
  74. .TP
  75. .B \-\-cleanup\-commits
  76. cleanup commit\-only 17\-byte segment files
  77. .TP
  78. .BI \-\-threshold \ PERCENT
  79. set minimum threshold for saved space in PERCENT (Default: 10)
  80. .UNINDENT
  81. .SH EXAMPLES
  82. .INDENT 0.0
  83. .INDENT 3.5
  84. .sp
  85. .EX
  86. # compact segments and free repo disk space
  87. $ borg compact /path/to/repo
  88. # same as above plus clean up 17byte commit\-only segments
  89. $ borg compact \-\-cleanup\-commits /path/to/repo
  90. .EE
  91. .UNINDENT
  92. .UNINDENT
  93. .SH SEE ALSO
  94. .sp
  95. \fIborg\-common(1)\fP
  96. .SH AUTHOR
  97. The Borg Collective
  98. .\" Generated by docutils manpage writer.
  99. .