borg-delete.1 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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 "2022-08-20" "" "borg backup tool"
  31. .SH NAME
  32. borg-delete \- Delete an existing repository or archives
  33. .SH SYNOPSIS
  34. .sp
  35. borg [common options] delete [options] [REPOSITORY_OR_ARCHIVE] [ARCHIVE...]
  36. .SH DESCRIPTION
  37. .sp
  38. This command deletes an archive from the repository or the complete 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 you delete a complete repository, the security info and local cache for it
  44. (if any) are also deleted. Alternatively, you can delete just the local cache
  45. with the \fB\-\-cache\-only\fP option, or keep the security info with the
  46. \fB\-\-keep\-security\-info\fP option.
  47. .sp
  48. When in doubt, use \fB\-\-dry\-run \-\-list\fP to see what would be deleted.
  49. .sp
  50. When using \fB\-\-stats\fP, you will get some statistics about how much data was
  51. deleted \- the "Deleted data" deduplicated size there is most interesting as
  52. that is how much your repository will shrink.
  53. Please note that the "All archives" stats refer to the state after deletion.
  54. .sp
  55. You can delete multiple archives by specifying their common prefix, if they
  56. have one, using the \fB\-\-prefix PREFIX\fP option. You can also specify a shell
  57. pattern to match multiple archives using the \fB\-\-glob\-archives GLOB\fP option
  58. (for more info on these patterns, see \fIborg_patterns\fP). Note that these
  59. two options are mutually exclusive.
  60. .sp
  61. To avoid accidentally deleting archives, especially when using glob patterns,
  62. it might be helpful to use the \fB\-\-dry\-run\fP to test out the command without
  63. actually making any changes to the repository.
  64. .SH OPTIONS
  65. .sp
  66. See \fIborg\-common(1)\fP for common options of Borg commands.
  67. .SS arguments
  68. .INDENT 0.0
  69. .TP
  70. .B REPOSITORY_OR_ARCHIVE
  71. repository or archive to delete
  72. .TP
  73. .B ARCHIVE
  74. archives to delete
  75. .UNINDENT
  76. .SS optional arguments
  77. .INDENT 0.0
  78. .TP
  79. .B \-n\fP,\fB \-\-dry\-run
  80. do not change repository
  81. .TP
  82. .B \-\-list
  83. output verbose list of archives
  84. .TP
  85. .B \-s\fP,\fB \-\-stats
  86. print statistics for the deleted archive
  87. .TP
  88. .B \-\-cache\-only
  89. delete only the local cache for the given repository
  90. .TP
  91. .B \-\-force
  92. force deletion of corrupted archives, use \fB\-\-force \-\-force\fP in case \fB\-\-force\fP does not work.
  93. .TP
  94. .B \-\-keep\-security\-info
  95. keep the local security info when deleting a repository
  96. .TP
  97. .B \-\-save\-space
  98. work slower, but using less space
  99. .TP
  100. .BI \-c \ SECONDS\fR,\fB \ \-\-checkpoint\-interval \ SECONDS
  101. write checkpoint every SECONDS seconds (Default: 1800)
  102. .UNINDENT
  103. .SS Archive filters
  104. .INDENT 0.0
  105. .TP
  106. .BI \-P \ PREFIX\fR,\fB \ \-\-prefix \ PREFIX
  107. only consider archive names starting with this prefix.
  108. .TP
  109. .BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
  110. only consider archive names matching the glob. sh: rules apply, see "borg help patterns". \fB\-\-prefix\fP and \fB\-\-glob\-archives\fP are mutually exclusive.
  111. .TP
  112. .BI \-\-sort\-by \ KEYS
  113. Comma\-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
  114. .TP
  115. .BI \-\-first \ N
  116. consider first N archives after other filters were applied
  117. .TP
  118. .BI \-\-last \ N
  119. consider last N archives after other filters were applied
  120. .UNINDENT
  121. .SH EXAMPLES
  122. .INDENT 0.0
  123. .INDENT 3.5
  124. .sp
  125. .nf
  126. .ft C
  127. # delete a single backup archive:
  128. $ borg delete /path/to/repo::Monday
  129. # actually free disk space:
  130. $ borg compact /path/to/repo
  131. # delete all archives whose names begin with the machine\(aqs hostname followed by "\-"
  132. $ borg delete \-\-prefix \(aq{hostname}\-\(aq /path/to/repo
  133. # delete all archives whose names contain "\-2012\-"
  134. $ borg delete \-\-glob\-archives \(aq*\-2012\-*\(aq /path/to/repo
  135. # see what would be deleted if delete was run without \-\-dry\-run
  136. $ borg delete \-\-list \-\-dry\-run \-a \(aq*\-May\-*\(aq /path/to/repo
  137. # delete the whole repository and the related local cache:
  138. $ borg delete /path/to/repo
  139. You requested to completely DELETE the repository *including* all archives it contains:
  140. repo Mon, 2016\-02\-15 19:26:54
  141. root\-2016\-02\-15 Mon, 2016\-02\-15 19:36:29
  142. newname Mon, 2016\-02\-15 19:50:19
  143. Type \(aqYES\(aq if you understand this and want to continue: YES
  144. .ft P
  145. .fi
  146. .UNINDENT
  147. .UNINDENT
  148. .SH SEE ALSO
  149. .sp
  150. \fIborg\-common(1)\fP, \fIborg\-compact(1)\fP
  151. .SH AUTHOR
  152. The Borg Collective
  153. .\" Generated by docutils manpage writer.
  154. .