2017-02-05 13:22:06 +00:00
|
|
|
.\" Man page generated from reStructuredText.
|
|
|
|
.
|
|
|
|
.
|
|
|
|
.nr rst2man-indent-level 0
|
|
|
|
.
|
|
|
|
.de1 rstReportMargin
|
|
|
|
\\$1 \\n[an-margin]
|
|
|
|
level \\n[rst2man-indent-level]
|
|
|
|
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
-
|
|
|
|
\\n[rst2man-indent0]
|
|
|
|
\\n[rst2man-indent1]
|
|
|
|
\\n[rst2man-indent2]
|
|
|
|
..
|
|
|
|
.de1 INDENT
|
|
|
|
.\" .rstReportMargin pre:
|
|
|
|
. RS \\$1
|
|
|
|
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
|
|
|
. nr rst2man-indent-level +1
|
|
|
|
.\" .rstReportMargin post:
|
|
|
|
..
|
|
|
|
.de UNINDENT
|
|
|
|
. RE
|
|
|
|
.\" indent \\n[an-margin]
|
|
|
|
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.nr rst2man-indent-level -1
|
|
|
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
|
|
..
|
2024-02-20 16:12:43 +00:00
|
|
|
.TH "BORG-DELETE" 1 "2024-02-20" "" "borg backup tool"
|
2022-06-23 23:19:19 +00:00
|
|
|
.SH NAME
|
|
|
|
borg-delete \- Delete archives
|
2017-02-05 13:22:06 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.sp
|
2022-06-23 23:19:19 +00:00
|
|
|
borg [common options] delete [options]
|
2017-02-05 13:22:06 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.sp
|
2022-06-23 23:19:19 +00:00
|
|
|
This command deletes archives from the repository.
|
2018-07-12 20:00:19 +00:00
|
|
|
.sp
|
|
|
|
Important: When deleting archives, repository disk space is \fBnot\fP freed until
|
|
|
|
you run \fBborg compact\fP\&.
|
|
|
|
.sp
|
2021-02-06 00:32:54 +00:00
|
|
|
When in doubt, use \fB\-\-dry\-run \-\-list\fP to see what would be deleted.
|
|
|
|
.sp
|
2017-11-25 13:38:04 +00:00
|
|
|
When using \fB\-\-stats\fP, you will get some statistics about how much data was
|
2022-09-10 14:03:27 +00:00
|
|
|
deleted \- the \(dqDeleted data\(dq deduplicated size there is most interesting as
|
2017-11-25 13:38:04 +00:00
|
|
|
that is how much your repository will shrink.
|
2022-09-10 14:03:27 +00:00
|
|
|
Please note that the \(dqAll archives\(dq stats refer to the state after deletion.
|
2018-07-12 20:00:19 +00:00
|
|
|
.sp
|
2022-10-02 13:51:17 +00:00
|
|
|
You can delete multiple archives by specifying a matching pattern,
|
|
|
|
using the \fB\-\-match\-archives PATTERN\fP option (for more info on these patterns,
|
2022-07-03 23:21:50 +00:00
|
|
|
see \fIborg_patterns\fP).
|
2018-07-12 20:00:19 +00:00
|
|
|
.sp
|
2022-06-23 23:19:19 +00:00
|
|
|
Always first use \fB\-\-dry\-run \-\-list\fP to see what would be deleted.
|
2017-02-05 13:22:06 +00:00
|
|
|
.SH OPTIONS
|
|
|
|
.sp
|
|
|
|
See \fIborg\-common(1)\fP for common options of Borg commands.
|
2022-11-26 21:23:46 +00:00
|
|
|
.SS options
|
2017-02-05 13:22:06 +00:00
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B \-n\fP,\fB \-\-dry\-run
|
2018-07-12 20:00:19 +00:00
|
|
|
do not change repository
|
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B \-\-list
|
2021-02-06 00:32:54 +00:00
|
|
|
output verbose list of archives
|
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B \-\-consider\-checkpoints
|
|
|
|
consider checkpoint archives for deletion (default: not considered).
|
|
|
|
.TP
|
|
|
|
.B \-s\fP,\fB \-\-stats
|
2017-02-05 13:22:06 +00:00
|
|
|
print statistics for the deleted archive
|
|
|
|
.TP
|
2022-06-23 23:19:19 +00:00
|
|
|
.B \-\-force
|
2017-11-25 13:38:04 +00:00
|
|
|
force deletion of corrupted archives, use \fB\-\-force \-\-force\fP in case \fB\-\-force\fP does not work.
|
2017-02-05 13:22:06 +00:00
|
|
|
.TP
|
2022-08-03 20:19:12 +00:00
|
|
|
.BI \-c \ SECONDS\fR,\fB \ \-\-checkpoint\-interval \ SECONDS
|
|
|
|
write checkpoint every SECONDS seconds (Default: 1800)
|
2017-02-05 13:22:06 +00:00
|
|
|
.UNINDENT
|
2017-11-25 13:38:04 +00:00
|
|
|
.SS Archive filters
|
2017-02-05 13:22:06 +00:00
|
|
|
.INDENT 0.0
|
|
|
|
.TP
|
2022-10-02 13:51:17 +00:00
|
|
|
.BI \-a \ PATTERN\fR,\fB \ \-\-match\-archives \ PATTERN
|
|
|
|
only consider archive names matching the pattern. see \(dqborg help match\-archives\(dq.
|
2017-02-05 13:22:06 +00:00
|
|
|
.TP
|
2017-11-25 13:38:04 +00:00
|
|
|
.BI \-\-sort\-by \ KEYS
|
2024-02-20 16:12:43 +00:00
|
|
|
Comma\-separated list of sorting keys; valid keys are: timestamp, archive, name, id; default is: timestamp
|
2017-02-05 13:22:06 +00:00
|
|
|
.TP
|
|
|
|
.BI \-\-first \ N
|
|
|
|
consider first N archives after other filters were applied
|
|
|
|
.TP
|
|
|
|
.BI \-\-last \ N
|
|
|
|
consider last N archives after other filters were applied
|
2023-02-26 20:30:54 +00:00
|
|
|
.TP
|
|
|
|
.BI \-\-oldest \ TIMESPAN
|
|
|
|
consider archives between the oldest archive\(aqs timestamp and (oldest + TIMESPAN), e.g. 7d or 12m.
|
|
|
|
.TP
|
|
|
|
.BI \-\-newest \ TIMESPAN
|
|
|
|
consider archives between the newest archive\(aqs timestamp and (newest \- TIMESPAN), e.g. 7d or 12m.
|
|
|
|
.TP
|
|
|
|
.BI \-\-older \ TIMESPAN
|
2024-02-20 16:12:43 +00:00
|
|
|
consider archives older than (now \- TIMESPAN), e.g. 7d or 12m.
|
2023-02-26 20:30:54 +00:00
|
|
|
.TP
|
|
|
|
.BI \-\-newer \ TIMESPAN
|
|
|
|
consider archives newer than (now \- TIMESPAN), e.g. 7d or 12m.
|
2017-02-05 13:22:06 +00:00
|
|
|
.UNINDENT
|
|
|
|
.SH EXAMPLES
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ft C
|
|
|
|
# delete a single backup archive:
|
2023-09-14 13:52:08 +00:00
|
|
|
$ borg delete \-a Monday
|
2018-07-12 20:00:19 +00:00
|
|
|
# actually free disk space:
|
2022-06-23 23:19:19 +00:00
|
|
|
$ borg compact
|
2018-07-12 20:00:19 +00:00
|
|
|
|
2022-09-10 14:03:27 +00:00
|
|
|
# delete all archives whose names begin with the machine\(aqs hostname followed by \(dq\-\(dq
|
2023-06-11 21:10:23 +00:00
|
|
|
$ borg delete \-a \(aqsh:{hostname}\-*\(aq
|
2018-07-12 20:00:19 +00:00
|
|
|
|
2022-09-10 14:03:27 +00:00
|
|
|
# delete all archives whose names contain \(dq\-2012\-\(dq
|
2023-06-11 21:10:23 +00:00
|
|
|
$ borg delete \-a \(aqsh:*\-2012\-*\(aq
|
2018-07-12 20:00:19 +00:00
|
|
|
|
|
|
|
# see what would be deleted if delete was run without \-\-dry\-run
|
2023-06-11 21:10:23 +00:00
|
|
|
$ borg delete \-\-list \-\-dry\-run \-a \(aqsh:*\-May\-*\(aq
|
2017-02-05 13:22:06 +00:00
|
|
|
.ft P
|
|
|
|
.fi
|
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.SH SEE ALSO
|
|
|
|
.sp
|
2023-01-02 22:51:22 +00:00
|
|
|
\fIborg\-common(1)\fP, \fIborg\-compact(1)\fP, \fIborg\-rdelete(1)\fP
|
2017-02-05 13:22:06 +00:00
|
|
|
.SH AUTHOR
|
|
|
|
The Borg Collective
|
|
|
|
.\" Generated by docutils manpage writer.
|
|
|
|
.
|