| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 | .\" Man page generated from reStructuredText...TH BORG-CHECK 1 "2017-02-11" "" "borg backup tool".SH NAMEborg-check \- Check repository consistency..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...SH SYNOPSIS.spborg check <options> REPOSITORY_OR_ARCHIVE.SH DESCRIPTION.spThe check command verifies the consistency of a repository and the corresponding archives..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 2If we are in repair mode and a integrity error is detected for a segment,we try to recover as many objects from the segment as possible..IP \(bu 2In repair mode, it makes sure that the index is consistent with the datastored in the segments..IP \(bu 2If you use a remote repo server via ssh:, the repo check is executed on therepo server without causing significant network traffic..IP \(bu 2The repository check can be skipped using the \-\-archives\-only 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 frommanifest..IP \(bu 2For all files (items) in the archive, for all chunks referenced by thesefiles, check if chunk is present.If a chunk is not present and we are in repair mode, replace it with a same\-sizereplacement chunk of zeros.If a previously lost chunk reappears (e.g. via a later backup) and we are inrepair mode, the all\-zero replacement chunk will be replaced by the correct chunk.This requires reading of archive and file metadata, but not data..IP \(bu 2If we are in repair mode and we checked all the archives: delete orphanedchunks from the repo..IP \(bu 2if you use a remote repo server via ssh:, the archive check is executed onthe client machine (because if encryption is enabled, the checks will requiredecryption and this is always done client\-side, because key access will berequired)..IP \(bu 2The archive checks can be time consuming, they can be skipped using the\-\-repository\-only option..UNINDENT.spThe \-\-verify\-data 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..spIt is also very slow..SH OPTIONS.spSee \fIborg\-common(1)\fP for common options of Borg commands..SS arguments.INDENT 0.0.TP.B REPOSITORY_OR_ARCHIVErepository or archive to check consistency of.UNINDENT.SS optional arguments.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 \-\-repository\-only).TP.B \-\-repairattempt to repair any inconsistencies found.TP.B \-\-save\-spacework slower, but using less space.TP.B \-p\fP,\fB  \-\-progressshow progress display while checking.UNINDENT.SS filters.INDENT 0.0.TP.B \-P\fP,\fB  \-\-prefixonly consider archive names starting with this prefix.TP.B \-\-sort\-byComma\-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..
 |