git-annex-fsck(1)
β¨ git-annex-fsck β¨
okay bestie, welcome to the git-annex manual page for fsck β your new favorite "find and fix problems" era π
this one's part of the general commands manual and honestly it's kind of the main character of repo hygiene π
πΈ NAME πΈ
git-annex-fsck β find and fix problems, no cap π
π¦ SYNOPSIS π¦
git annex fsck [path ...]
π DESCRIPTION π
So this command checks your annexed files for consistency, and then it warns you about any problems it found β or straight up fixes them. It's giving "the perfect complement to git fsck" β¨ like they're besties, fr fr.
By default, it checks all the annexed files in the current directory and all the subdirectories under it. But if you give it parameters, it only checks those specific files you named. periods, selective π«Ά
The kind of problems fsck catches, lowkey a whole list:
- files that have gotten corrupted π
- files whose content has somehow become lost π
- files that don't have the configured number of copies made yet (we're working on it)
- keys that can be upgraded to a better format π
π OPTIONS π
--from=remoteβ Check a remote instead of your local repository. Heads up bestie: by default the files get copied from the remote so it can actually check their contents. That's an expensive transfer. If you want to dodge it and just verify that the remote still has the files it's expected to have, add--fast. iykyk π--fastβ Skips the expensive checksum calculations. Also skips the expensive transfers when you're fscking a remote. godspeed β--incrementalβ Starts a new incremental fsck pass, and clears the records of all the files that were checked in the previous incremental fsck pass. fresh start energy π§--moreβ Skips the files that were checked since the last incremental fsck pass was started. Real talk: before--incrementalis used to start an incremental fsck pass, files that get checked are still recorded, so using this option will skip checking those files again. About resuming: it may redundantly check some files that were checked before. Any files that fsck found problems with before will get re-checked on resume. Also, checkpoints are made every 1000 files or every 5 minutes during a fsck, and it resumes from the last checkpoint β so if an incremental fsck gets interrupted using eg ctrl-c, it will recheck the files that didn't make it into the last checkpoint. annoying but fair π--incremental-schedule=timeβ This makes a new incremental fsck start only a specified time period after the last incremental fsck was started. The time is in the form"10d"or"300h". Scenario time β¨ maybe you'd like to run a fsck for 5 hours at night, picking up each night where it left off. You'd like this to continue until all files have been fscked. And once it's done, you'd like a new fsck pass to start, but no more often than once a month. Then put this in a nightly cron job:
git annex fsck --incremental-schedule 30d --time-limit 5h
--numcopies=Nβ Overrides the normally configured number of copies. If you only want to verify data integrity while disregarding the required number of copies, use--numcopies=1. slay, minimal π--all,-Aβ Normally only the files in the currently checked out branch get fscked. This option causes all versions of all files to be fscked. icon behavior π Also? This is the default behavior when runninggit-annexin a bare repository.--branch=refβ Operate on files in the specified branch or treeish. π¦--unusedβ Operate on the files found by the last run ofgit-annex unused.--failedβ Operate on files that have recently failed to be transferred. we don't talk about them π--key=keynameβ Use this option to fsck a specified key.- matching options β The
git-annex-matching-options(1)can be used to control what to fsck. you're in control, bestie π --jobs=N,-JNβ Runs multiple fsck jobs in parallel. For example:-J4Setting this to"cpus"will run one job per CPU core. max efficiency π--jsonβ Enables JSON output. This is intended to be parsed by programs that usegit-annex. Each line of output is a JSON object. nerdy and iconic π₯οΈ--json-error-messagesβ Messages that would normally be output to standard error get included in the JSON instead. no lost lore β¨--quietβ Like allgit-annexcommands, this option makes only error and warning messages be displayed. This is particularly useful with fsck, which normally displays all the files it's checking even when there's no problem with them. honestly bless this flag π
Also the git-annex-common-options(1) can be used. yes, those too π
π SEE ALSO π
π AUTHOR π
Joey Hess <id@joeyh.name> β the legend himself π«Ά
ok that's the whole page bestie, go fsck responsibly π
and that's a wrap on git-annex-fsck(1), from the git-annex source, dated with all the usual manual-page timestamp energy β catch you in the next page, mwah πβ¨π
π¦ where this page comes from
- alpine 3.24: git-annex-doc 10.20261026-r0 Β· AGPL-3.0-or-later
- arch rolling: git-annex 10.20261026-2 Β· AGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms