1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-19 14:02:55 +00:00
borg/docs/man/borg-compact.1

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

95 lines
2.6 KiB
Groff
Raw Normal View History

2018-07-12 20:00:19 +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-11-16 19:14:16 +00:00
.TH "BORG-COMPACT" 1 "2024-11-16" "" "borg backup tool"
2022-06-23 23:19:19 +00:00
.SH NAME
2024-09-07 20:31:48 +00:00
borg-compact \- Collect garbage in repository
2018-07-12 20:00:19 +00:00
.SH SYNOPSIS
.sp
2022-06-23 23:19:19 +00:00
borg [common options] compact [options]
2018-07-12 20:00:19 +00:00
.SH DESCRIPTION
.sp
2024-09-07 20:31:48 +00:00
Free repository space by deleting unused chunks.
2018-07-12 20:00:19 +00:00
.sp
2024-11-16 19:14:16 +00:00
borg compact analyzes all existing archives to find out which repository
objects are actually used (referenced). It then deletes all unused objects
from the repository to free space.
2018-07-12 20:00:19 +00:00
.sp
2024-11-16 19:14:16 +00:00
Unused objects may result from:
.INDENT 0.0
.IP \(bu 2
borg delete or prune usage
.IP \(bu 2
interrupted backups (maybe retry the backup first before running compact)
.IP \(bu 2
backup of source files that had an I/O error in the middle of their contents
and that were skipped due to this
.IP \(bu 2
corruption of the repository (e.g. the archives directory having lost
entries, see notes below)
.UNINDENT
.sp
You usually don\(aqt want to run \fBborg compact\fP after every write operation, but
either regularly (e.g. once a month, possibly together with \fBborg check\fP) or
when disk space needs to be freed.
.sp
\fBImportant:\fP
.sp
After compacting it is no longer possible to use \fBborg undelete\fP to recover
previously soft\-deleted archives.
.sp
\fBborg compact\fP might also delete data from archives that were \(dqlost\(dq due to
archives directory corruption. Such archives could potentially be restored with
\fBborg check \-\-find\-lost\-archives [\-\-repair]\fP, which is slow. You therefore
might not want to do that unless there are signs of lost archives (e.g. when
seeing fatal errors when creating backups or when archives are missing in
\fBborg repo\-list\fP).
2018-07-12 20:00:19 +00:00
.SH OPTIONS
.sp
See \fIborg\-common(1)\fP for common options of Borg commands.
.SH EXAMPLES
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
# compact segments and free repo disk space
2022-06-23 23:19:19 +00:00
$ borg compact
2018-07-12 20:00:19 +00:00
.ft P
.fi
.UNINDENT
.UNINDENT
.SH SEE ALSO
.sp
\fIborg\-common(1)\fP
.SH AUTHOR
The Borg Collective
.\" Generated by docutils manpage writer.
.