2015-03-24 19:23:59 +00:00
|
|
|
# NAME
|
|
|
|
|
2015-07-09 14:58:38 +00:00
|
|
|
git-annex fsck - find and fix problems
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
git annex fsck `[path ...]`
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
With no parameters, this command checks the whole annex for consistency,
|
|
|
|
and warns about or fixes any problems found. This is a good complement to
|
|
|
|
`git fsck`.
|
|
|
|
|
|
|
|
With parameters, only the specified files are checked.
|
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
|
|
|
|
* `--from=remote`
|
|
|
|
|
|
|
|
Check a remote, rather than the local repository.
|
|
|
|
|
|
|
|
Note that by default, files will be copied from the remote to check
|
|
|
|
their contents. To avoid this expensive transfer, and only
|
|
|
|
verify that the remote still has the files that are expected to be on it,
|
|
|
|
add the `--fast` option.
|
|
|
|
|
|
|
|
* `--fast`
|
|
|
|
|
|
|
|
Avoids expensive checksum calculations (and expensive transfers when
|
|
|
|
fscking a remote).
|
|
|
|
|
|
|
|
* `--incremental`
|
|
|
|
|
|
|
|
Start a new incremental fsck pass. An incremental fsck can be interrupted
|
|
|
|
at any time, with eg ctrl-c.
|
|
|
|
|
|
|
|
* `--more`
|
|
|
|
|
2015-07-31 20:42:15 +00:00
|
|
|
Resume the last incremental fsck pass, where it left off.
|
|
|
|
|
|
|
|
Resuming may redundantly check some files that were checked
|
|
|
|
before. Any files that fsck found problems with before will be 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.
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
* `--incremental-schedule=time`
|
|
|
|
|
|
|
|
This makes a new incremental fsck be started only a specified
|
|
|
|
time period after the last incremental fsck was started.
|
|
|
|
|
|
|
|
The time is in the form "10d" or "300h".
|
|
|
|
|
|
|
|
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`
|
|
|
|
|
|
|
|
Override the normally configured number of copies.
|
|
|
|
|
|
|
|
To verify data integrity only while disregarding required number of copies,
|
|
|
|
use `--numcopies=1`.
|
|
|
|
|
2018-04-04 03:12:04 +00:00
|
|
|
* `--all` `-A`
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
Normally only the files in the currently checked out branch
|
|
|
|
are fscked. This option causes all versions of all files to be fscked.
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
This is the default behavior when running git-annex in a bare repository.
|
|
|
|
|
--branch, stage 1
Added --branch option to copy, drop, fsck, get, metadata, mirror, move, and
whereis commands. This option makes git-annex operate on files that are
included in a specified branch (or other treeish).
The names of the files from the branch that are being operated on are not
displayed yet; only the keys. Displaying the filenames will need changes
to every affected command.
Also, note that --branch can be specified repeatedly. This is not really
documented, but seemed worth supporting, especially since we may later want
the ability to operate on all branches matching a refspec. However, when
operating on two branches that contain the same key, that key will be
operated on twice.
2016-07-20 16:05:22 +00:00
|
|
|
* `--branch=ref`
|
|
|
|
|
|
|
|
Operate on files in the specified branch or treeish.
|
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
* `--unused`
|
|
|
|
|
|
|
|
Operate on files found by last run of git-annex unused.
|
|
|
|
|
|
|
|
* `--key=keyname`
|
|
|
|
|
|
|
|
Use this option to fsck a specified key.
|
|
|
|
|
|
|
|
* file matching options
|
|
|
|
|
|
|
|
The [[git-annex-matching-options]](1)
|
|
|
|
can be used to specify files to fsck.
|
|
|
|
|
2015-11-04 20:26:21 +00:00
|
|
|
* `--jobs=N` `-JN`
|
|
|
|
|
|
|
|
Runs multiple fsck jobs in parallel. For example: `-J4`
|
|
|
|
|
2019-05-10 17:24:31 +00:00
|
|
|
Setting this to "cpus" will run one job per CPU core.
|
|
|
|
|
2017-06-26 17:40:57 +00:00
|
|
|
* `--json`
|
|
|
|
|
|
|
|
Enable JSON output. This is intended to be parsed by programs that use
|
|
|
|
git-annex. Each line of output is a JSON object.
|
|
|
|
|
2018-02-19 18:28:17 +00:00
|
|
|
* `--json-error-messages`
|
|
|
|
|
2018-02-19 19:33:59 +00:00
|
|
|
Messages that would normally be output to standard error are included in
|
|
|
|
the json instead.
|
2018-02-19 18:28:17 +00:00
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
# SEE ALSO
|
|
|
|
|
2015-05-29 16:12:55 +00:00
|
|
|
[[git-annex]](1)
|
|
|
|
|
|
|
|
[[git-annex-repair]](1)
|
|
|
|
|
|
|
|
[[git-annex-expire]](1)
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
# AUTHOR
|
|
|
|
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|