borg-compact.1 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH BORG-COMPACT 1 "2020-12-06" "" "borg backup tool"
  4. .SH NAME
  5. borg-compact \- compact segment files in the repository
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  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.
  57. .sp
  58. See \fIseparate_compaction\fP in Additional Notes for more details.
  59. .SH OPTIONS
  60. .sp
  61. See \fIborg\-common(1)\fP for common options of Borg commands.
  62. .SS arguments
  63. .INDENT 0.0
  64. .TP
  65. .B REPOSITORY
  66. repository to compact
  67. .UNINDENT
  68. .SS optional arguments
  69. .INDENT 0.0
  70. .TP
  71. .B \-\-cleanup\-commits
  72. cleanup commit\-only 17\-byte segment files
  73. .TP
  74. .BI \-\-threshold \ PERCENT
  75. set minimum threshold for saved space in PERCENT (Default: 10)
  76. .UNINDENT
  77. .SH EXAMPLES
  78. .INDENT 0.0
  79. .INDENT 3.5
  80. .sp
  81. .nf
  82. .ft C
  83. # compact segments and free repo disk space
  84. $ borg compact /path/to/repo
  85. # same as above plus clean up 17byte commit\-only segments
  86. $ borg compact \-\-cleanup\-commits /path/to/repo
  87. .ft P
  88. .fi
  89. .UNINDENT
  90. .UNINDENT
  91. .SH SEE ALSO
  92. .sp
  93. \fIborg\-common(1)\fP
  94. .SH AUTHOR
  95. The Borg Collective
  96. .\" Generated by docutils manpage writer.
  97. .