.\" Man page generated from reStructuredText .\" by the Docutils 0.22.4 manpage writer. . . .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 .. .TH "borg-repo-compress" "1" "2026-08-29" "" "borg backup tool" .SH Name borg-repo-compress \- Repository (re-)compression. .SH SYNOPSIS .sp borg [common options] repo\-compress [options] .SH DESCRIPTION .sp Repository (re\-)compression (and/or re\-obfuscation). .sp Reads all repository objects and recompresses the ones that are not already using the compression type/level and obfuscation level given via \fB\-\-compression\fP\&. .sp The repository is processed one pack file at a time: a pack is read as a whole and, if it holds objects that need recompression, rewritten as a whole \- objects already using the desired compression are copied into the rewritten pack unchanged. A pack whose objects all already use the desired compression is not touched at all. Please note that the outcome of recompressing a chunk might not always be the desired compression type/level \- if no compression gives a shorter output, that might be chosen; such chunks are kept as they are. .sp Rewriting a pack invalidates every client\(aqs cached chunk index, so the next borg operation of each client will re\-fetch the chunk index from the repository. .sp This command needs free space in the repository for the rewritten pack files (roughly one pack file size while running). .sp If the \fBborg repo\-compress\fP process receives a SIGINT signal (Ctrl\-C), it stops at the next pack boundary, leaving the repository and its chunk index in a consistent state; running it again later processes the remaining packs. .sp Both \fB\-\-progress\fP and \fB\-\-stats\fP are recommended when \fBborg repo\-compress\fP is used interactively. .sp You do \fBnot\fP need to run \fBborg compact\fP after \fBborg repo\-compress\fP\&. .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. .SS options .INDENT 0.0 .TP .BI \-C \ COMPRESSION\fR,\fB \ \-\-compression \ COMPRESSION select compression algorithm, see the output of the \(dqborg help compression\(dq command for details. .TP .B \-s\fP,\fB \-\-stats print statistics .UNINDENT .SH EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .EX # Recompress repository contents $ borg repo\-compress \-\-progress \-\-compression=zstd,3 # Recompress and obfuscate repository contents $ borg repo\-compress \-\-progress \-\-compression=obfuscate,1,zstd,3 .EE .UNINDENT .UNINDENT .SH SEE ALSO .sp \fIborg\-common(1)\fP .SH Author The Borg Collective .\" End of generated man page.