borg-delete.1 4.7 KB

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