2
0

borg-compact.1 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 "2024-11-16" "" "borg backup tool"
  31. .SH NAME
  32. borg-compact \- Collect garbage in repository
  33. .SH SYNOPSIS
  34. .sp
  35. borg [common options] compact [options]
  36. .SH DESCRIPTION
  37. .sp
  38. Free repository space by deleting unused chunks.
  39. .sp
  40. borg compact analyzes all existing archives to find out which repository
  41. objects are actually used (referenced). It then deletes all unused objects
  42. from the repository to free space.
  43. .sp
  44. Unused objects may result from:
  45. .INDENT 0.0
  46. .IP \(bu 2
  47. borg delete or prune usage
  48. .IP \(bu 2
  49. interrupted backups (maybe retry the backup first before running compact)
  50. .IP \(bu 2
  51. backup of source files that had an I/O error in the middle of their contents
  52. and that were skipped due to this
  53. .IP \(bu 2
  54. corruption of the repository (e.g. the archives directory having lost
  55. entries, see notes below)
  56. .UNINDENT
  57. .sp
  58. You usually don\(aqt want to run \fBborg compact\fP after every write operation, but
  59. either regularly (e.g. once a month, possibly together with \fBborg check\fP) or
  60. when disk space needs to be freed.
  61. .sp
  62. \fBImportant:\fP
  63. .sp
  64. After compacting it is no longer possible to use \fBborg undelete\fP to recover
  65. previously soft\-deleted archives.
  66. .sp
  67. \fBborg compact\fP might also delete data from archives that were \(dqlost\(dq due to
  68. archives directory corruption. Such archives could potentially be restored with
  69. \fBborg check \-\-find\-lost\-archives [\-\-repair]\fP, which is slow. You therefore
  70. might not want to do that unless there are signs of lost archives (e.g. when
  71. seeing fatal errors when creating backups or when archives are missing in
  72. \fBborg repo\-list\fP).
  73. .SH OPTIONS
  74. .sp
  75. See \fIborg\-common(1)\fP for common options of Borg commands.
  76. .SH EXAMPLES
  77. .INDENT 0.0
  78. .INDENT 3.5
  79. .sp
  80. .nf
  81. .ft C
  82. # compact segments and free repo disk space
  83. $ borg compact
  84. .ft P
  85. .fi
  86. .UNINDENT
  87. .UNINDENT
  88. .SH SEE ALSO
  89. .sp
  90. \fIborg\-common(1)\fP
  91. .SH AUTHOR
  92. The Borg Collective
  93. .\" Generated by docutils manpage writer.
  94. .