| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 | .\" 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...TH "BORG-CHECK" 1 "2023-01-02" "" "borg backup tool".SH NAMEborg-check \- Check repository consistency.SH SYNOPSIS.spborg [common options] check [options].SH DESCRIPTION.spThe check command verifies the consistency of a repository and the corresponding archives..spcheck \-\-repair is a potentially dangerous function and might lead to data loss(for kinds of corruption it is not capable of dealing with). BE VERY CAREFUL!.spPursuant to the previous warning it is also highly recommended to test thereliability of the hardware running this software with stress testing softwaresuch as memory testers. Unreliable hardware can also lead to data loss especiallywhen this command is run in repair mode..spFirst, the underlying repository data files are checked:.INDENT 0.0.IP \(bu 2For all segments, the segment magic header is checked..IP \(bu 2For all objects stored in the segments, all metadata (e.g. CRC and size) andall data is read. The read data is checked by size and CRC. Bit rot and othertypes of accidental damage can be detected this way..IP \(bu 2In repair mode, if an integrity error is detected in a segment, try to recoveras many objects from the segment as possible..IP \(bu 2In repair mode, make sure that the index is consistent with the data stored inthe segments..IP \(bu 2If checking a remote repo via \fBssh:\fP, the repo check is executed on the serverwithout causing significant network traffic..IP \(bu 2The repository check can be skipped using the \fB\-\-archives\-only\fP option..IP \(bu 2A repository check can be time consuming. Partial checks are possible with the\fB\-\-max\-duration\fP option..UNINDENT.spSecond, the consistency and correctness of the archive metadata is verified:.INDENT 0.0.IP \(bu 2Is the repo manifest present? If not, it is rebuilt from archive metadatachunks (this requires reading and decrypting of all metadata and data)..IP \(bu 2Check if archive metadata chunk is present; if not, remove archive from manifest..IP \(bu 2For all files (items) in the archive, for all chunks referenced by thesefiles, check if chunk is present. In repair mode, if a chunk is not present,replace it with a same\-size replacement chunk of zeroes. If a previously lostchunk reappears (e.g. via a later backup), in repair mode the all\-zero replacementchunk will be replaced by the correct chunk. This requires reading of archive andfile metadata, but not data..IP \(bu 2In repair mode, when all the archives were checked, orphaned chunks are deletedfrom the repo. One cause of orphaned chunks are input file related errors (likeread errors) in the archive creation process..IP \(bu 2In verify\-data mode, a complete cryptographic verification of the archive dataintegrity is performed. This conflicts with \fB\-\-repository\-only\fP as this modeonly makes sense if the archive checks are enabled. The full details of this modeare documented below..IP \(bu 2If checking a remote repo via \fBssh:\fP, the archive check is executed on theclient machine because it requires decryption, and this is always done client\-sideas key access is needed..IP \(bu 2The archive checks can be time consuming; they can be skipped using the\fB\-\-repository\-only\fP option..UNINDENT.spThe \fB\-\-max\-duration\fP option can be used to split a long\-running repository checkinto multiple partial checks. After the given number of seconds the check isinterrupted. The next partial check will continue where the previous one stopped,until the complete repository has been checked. Example: Assuming a complete check took 7hours, then running a daily check with \-\-max\-duration=3600 (1 hour) resulted in onecompleted check per week..spAttention: A partial \-\-repository\-only check can only do way less checking than a full\-\-repository\-only check: only the non\-cryptographic checksum checks on segment fileentries are done, while a full \-\-repository\-only check would also do a repo index check.A partial check cannot be combined with the \fB\-\-repair\fP option. Partial checksmay therefore be useful only with very large repositories where a full check would taketoo long.Doing a full repository check aborts a partial check; the next partial check will restartfrom the beginning..spThe \fB\-\-verify\-data\fP option will perform a full integrity verification (as opposed tochecking the CRC32 of the segment) of data, which means reading the data from therepository, decrypting and decompressing it. This is a cryptographic verification,which will detect (accidental) corruption. For encrypted repositories it istamper\-resistant as well, unless the attacker has access to the keys. It is also veryslow..SH OPTIONS.spSee \fIborg\-common(1)\fP for common options of Borg commands..SS options.INDENT 0.0.TP.B  \-\-repository\-onlyonly perform repository checks.TP.B  \-\-archives\-onlyonly perform archives checks.TP.B  \-\-verify\-dataperform cryptographic archive data integrity verification (conflicts with \fB\-\-repository\-only\fP).TP.B  \-\-repairattempt to repair any inconsistencies found.TP.BI \-\-max\-duration \ SECONDSdo only a partial repo check for max. SECONDS seconds (Default: unlimited).UNINDENT.SS Archive filters.INDENT 0.0.TP.BI \-a \ PATTERN\fR,\fB \ \-\-match\-archives \ PATTERNonly consider archive names matching the pattern. see \(dqborg help match\-archives\(dq..TP.BI \-\-sort\-by \ KEYSComma\-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp.TP.BI \-\-first \ Nconsider first N archives after other filters were applied.TP.BI \-\-last \ Nconsider last N archives after other filters were applied.UNINDENT.SH SEE ALSO.sp\fIborg\-common(1)\fP.SH AUTHORThe Borg Collective.\" Generated by docutils manpage writer..
 |