borg-delete.1 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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" "2025-05-19" "" "borg backup tool"
  31. .SH NAME
  32. borg-delete \- Delete archives
  33. .SH SYNOPSIS
  34. .sp
  35. borg [common options] delete [options] [NAME]
  36. .SH DESCRIPTION
  37. .sp
  38. This command soft\-deletes archives from the repository.
  39. .sp
  40. Important:
  41. .INDENT 0.0
  42. .IP \(bu 2
  43. The delete command will only mark archives for deletion (\(dqsoft\-deletion\(dq),
  44. repository disk space is \fBnot\fP freed until you run \fBborg compact\fP\&.
  45. .IP \(bu 2
  46. You can use \fBborg undelete\fP to undelete archives, but only until
  47. you run \fBborg compact\fP\&.
  48. .UNINDENT
  49. .sp
  50. When in doubt, use \fB\-\-dry\-run \-\-list\fP to see what would be deleted.
  51. .sp
  52. You can delete multiple archives by specifying a matching pattern,
  53. using the \fB\-\-match\-archives PATTERN\fP option (for more info on these patterns,
  54. see \fIborg_patterns\fP).
  55. .SH OPTIONS
  56. .sp
  57. See \fIborg\-common(1)\fP for common options of Borg commands.
  58. .SS arguments
  59. .INDENT 0.0
  60. .TP
  61. .B NAME
  62. specify the archive name
  63. .UNINDENT
  64. .SS options
  65. .INDENT 0.0
  66. .TP
  67. .B \-n\fP,\fB \-\-dry\-run
  68. do not change repository
  69. .TP
  70. .B \-\-list
  71. output verbose list of archives
  72. .UNINDENT
  73. .SS Archive filters
  74. .INDENT 0.0
  75. .TP
  76. .BI \-a \ PATTERN\fR,\fB \ \-\-match\-archives \ PATTERN
  77. only consider archives matching all patterns. see \(dqborg help match\-archives\(dq.
  78. .TP
  79. .BI \-\-sort\-by \ KEYS
  80. Comma\-separated list of sorting keys; valid keys are: timestamp, archive, name, id, tags, host, user; default is: timestamp
  81. .TP
  82. .BI \-\-first \ N
  83. consider first N archives after other filters were applied
  84. .TP
  85. .BI \-\-last \ N
  86. consider last N archives after other filters were applied
  87. .TP
  88. .BI \-\-oldest \ TIMESPAN
  89. consider archives between the oldest archive\(aqs timestamp and (oldest + TIMESPAN), e.g. 7d or 12m.
  90. .TP
  91. .BI \-\-newest \ TIMESPAN
  92. consider archives between the newest archive\(aqs timestamp and (newest \- TIMESPAN), e.g. 7d or 12m.
  93. .TP
  94. .BI \-\-older \ TIMESPAN
  95. consider archives older than (now \- TIMESPAN), e.g. 7d or 12m.
  96. .TP
  97. .BI \-\-newer \ TIMESPAN
  98. consider archives newer than (now \- TIMESPAN), e.g. 7d or 12m.
  99. .UNINDENT
  100. .SH EXAMPLES
  101. .INDENT 0.0
  102. .INDENT 3.5
  103. .sp
  104. .EX
  105. # delete all backup archives named \(dqkenny\-files\(dq:
  106. $ borg delete \-a kenny\-files
  107. # actually free disk space:
  108. $ borg compact
  109. # delete a specific backup archive using its unique archive ID prefix
  110. $ borg delete aid:d34db33f
  111. # delete all archives whose names begin with the machine\(aqs hostname followed by \(dq\-\(dq
  112. $ borg delete \-a \(aqsh:{hostname}\-*\(aq
  113. # delete all archives whose names contain \(dq\-2012\-\(dq
  114. $ borg delete \-a \(aqsh:*\-2012\-*\(aq
  115. # see what would be deleted if delete was run without \-\-dry\-run
  116. $ borg delete \-\-list \-\-dry\-run \-a \(aqsh:*\-May\-*\(aq
  117. .EE
  118. .UNINDENT
  119. .UNINDENT
  120. .SH SEE ALSO
  121. .sp
  122. \fIborg\-common(1)\fP, \fIborg\-compact(1)\fP, \fIborg\-repo\-delete(1)\fP
  123. .SH AUTHOR
  124. The Borg Collective
  125. .\" Generated by docutils manpage writer.
  126. .