borg-delete.1 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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-DELETE" 1 "2023-02-26" "" "borg backup tool"
  31. .SH NAME
  32. borg-delete \- Delete archives
  33. .SH SYNOPSIS
  34. .sp
  35. borg [common options] delete [options]
  36. .SH DESCRIPTION
  37. .sp
  38. This command deletes archives from the repository.
  39. .sp
  40. Important: When deleting archives, repository disk space is \fBnot\fP freed until
  41. you run \fBborg compact\fP\&.
  42. .sp
  43. When in doubt, use \fB\-\-dry\-run \-\-list\fP to see what would be deleted.
  44. .sp
  45. When using \fB\-\-stats\fP, you will get some statistics about how much data was
  46. deleted \- the \(dqDeleted data\(dq deduplicated size there is most interesting as
  47. that is how much your repository will shrink.
  48. Please note that the \(dqAll archives\(dq stats refer to the state after deletion.
  49. .sp
  50. You can delete multiple archives by specifying a matching pattern,
  51. using the \fB\-\-match\-archives PATTERN\fP option (for more info on these patterns,
  52. see \fIborg_patterns\fP).
  53. .sp
  54. Always first use \fB\-\-dry\-run \-\-list\fP to see what would be deleted.
  55. .SH OPTIONS
  56. .sp
  57. See \fIborg\-common(1)\fP for common options of Borg commands.
  58. .SS options
  59. .INDENT 0.0
  60. .TP
  61. .B \-n\fP,\fB \-\-dry\-run
  62. do not change repository
  63. .TP
  64. .B \-\-list
  65. output verbose list of archives
  66. .TP
  67. .B \-\-consider\-checkpoints
  68. consider checkpoint archives for deletion (default: not considered).
  69. .TP
  70. .B \-s\fP,\fB \-\-stats
  71. print statistics for the deleted archive
  72. .TP
  73. .B \-\-cache\-only
  74. delete only the local cache for the given repository
  75. .TP
  76. .B \-\-force
  77. force deletion of corrupted archives, use \fB\-\-force \-\-force\fP in case \fB\-\-force\fP does not work.
  78. .TP
  79. .BI \-c \ SECONDS\fR,\fB \ \-\-checkpoint\-interval \ SECONDS
  80. write checkpoint every SECONDS seconds (Default: 1800)
  81. .UNINDENT
  82. .SS Archive filters
  83. .INDENT 0.0
  84. .TP
  85. .BI \-a \ PATTERN\fR,\fB \ \-\-match\-archives \ PATTERN
  86. only consider archive names matching the pattern. see \(dqborg help match\-archives\(dq.
  87. .TP
  88. .BI \-\-sort\-by \ KEYS
  89. Comma\-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
  90. .TP
  91. .BI \-\-first \ N
  92. consider first N archives after other filters were applied
  93. .TP
  94. .BI \-\-last \ N
  95. consider last N archives after other filters were applied
  96. .TP
  97. .BI \-\-oldest \ TIMESPAN
  98. consider archives between the oldest archive\(aqs timestamp and (oldest + TIMESPAN), e.g. 7d or 12m.
  99. .TP
  100. .BI \-\-newest \ TIMESPAN
  101. consider archives between the newest archive\(aqs timestamp and (newest \- TIMESPAN), e.g. 7d or 12m.
  102. .TP
  103. .BI \-\-older \ TIMESPAN
  104. consider archives older than (now \- TIMESPAN), e.g. 7d oder 12m.
  105. .TP
  106. .BI \-\-newer \ TIMESPAN
  107. consider archives newer than (now \- TIMESPAN), e.g. 7d or 12m.
  108. .UNINDENT
  109. .SH EXAMPLES
  110. .INDENT 0.0
  111. .INDENT 3.5
  112. .sp
  113. .nf
  114. .ft C
  115. # delete a single backup archive:
  116. $ borg delete Monday
  117. # actually free disk space:
  118. $ borg compact
  119. # delete all archives whose names begin with the machine\(aqs hostname followed by \(dq\-\(dq
  120. $ borg delete \-a \(aq{hostname}\-*\(aq
  121. # delete all archives whose names contain \(dq\-2012\-\(dq
  122. $ borg delete \-a \(aq*\-2012\-*\(aq
  123. # see what would be deleted if delete was run without \-\-dry\-run
  124. $ borg delete \-\-list \-\-dry\-run \-a \(aq*\-May\-*\(aq
  125. .ft P
  126. .fi
  127. .UNINDENT
  128. .UNINDENT
  129. .SH SEE ALSO
  130. .sp
  131. \fIborg\-common(1)\fP, \fIborg\-compact(1)\fP, \fIborg\-rdelete(1)\fP
  132. .SH AUTHOR
  133. The Borg Collective
  134. .\" Generated by docutils manpage writer.
  135. .