borg-delete.1 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH BORG-DELETE 1 "2021-05-11" "" "borg backup tool"
  4. .SH NAME
  5. borg-delete \- Delete an existing repository or archives
  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] 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 \fBborg help 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. .UNINDENT
  100. .SS Archive filters
  101. .INDENT 0.0
  102. .TP
  103. .BI \-P \ PREFIX\fR,\fB \ \-\-prefix \ PREFIX
  104. only consider archive names starting with this prefix.
  105. .TP
  106. .BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
  107. 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.
  108. .TP
  109. .BI \-\-sort\-by \ KEYS
  110. Comma\-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
  111. .TP
  112. .BI \-\-first \ N
  113. consider first N archives after other filters were applied
  114. .TP
  115. .BI \-\-last \ N
  116. consider last N archives after other filters were applied
  117. .UNINDENT
  118. .SH EXAMPLES
  119. .INDENT 0.0
  120. .INDENT 3.5
  121. .sp
  122. .nf
  123. .ft C
  124. # delete a single backup archive:
  125. $ borg delete /path/to/repo::Monday
  126. # actually free disk space:
  127. $ borg compact /path/to/repo
  128. # delete all archives whose names begin with the machine\(aqs hostname followed by "\-"
  129. $ borg delete \-\-prefix \(aq{hostname}\-\(aq /path/to/repo
  130. # delete all archives whose names contain "\-2012\-"
  131. $ borg delete \-\-glob\-archives \(aq*\-2012\-*\(aq /path/to/repo
  132. # see what would be deleted if delete was run without \-\-dry\-run
  133. $ borg delete \-\-list \-\-dry\-run \-a \(aq*\-May\-*\(aq /path/to/repo
  134. # delete the whole repository and the related local cache:
  135. $ borg delete /path/to/repo
  136. You requested to completely DELETE the repository *including* all archives it contains:
  137. repo Mon, 2016\-02\-15 19:26:54
  138. root\-2016\-02\-15 Mon, 2016\-02\-15 19:36:29
  139. newname Mon, 2016\-02\-15 19:50:19
  140. Type \(aqYES\(aq if you understand this and want to continue: YES
  141. .ft P
  142. .fi
  143. .UNINDENT
  144. .UNINDENT
  145. .SH SEE ALSO
  146. .sp
  147. \fIborg\-common(1)\fP, \fIborg\-compact(1)\fP
  148. .SH AUTHOR
  149. The Borg Collective
  150. .\" Generated by docutils manpage writer.
  151. .