borg-delete.1 4.5 KB

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