1GROK-FSCK(1) GROK-FSCK(1)
2
3
4
6 GROK-FSCK - Check mirrored repositories for corruption
7
9 grok-fsck -c /path/to/fsck.conf
10
12 Git repositories can get corrupted whether they are frequently updated
13 or not, which is why it is useful to routinely check them using "git
14 fsck". Grokmirror ships with a "grok-fsck" utility that will run "git
15 fsck" on all mirrored git repositories. It is supposed to be run
16 nightly from cron, and will do its best to randomly stagger the checks
17 so only a subset of repositories is checked each night. Any errors will
18 be sent to the user set in MAILTO.
19
21 --version
22 show program's version number and exit
23
24 -h, --help
25 show this help message and exit
26
27 -v, --verbose
28 Be verbose and tell us what you are doing
29
30 -f, --force
31 Force immediate run on all repositories.
32
33 -c CONFIG, --config=CONFIG
34 Location of fsck.conf
35
36 --repack-only
37 Only find and repack repositories that need optimizing
38 (nightly run mode)
39
40 --connectivity
41 (Assumes --force): Run git fsck on all repos, but only check
42 connectivity
43
44 --repack-all-quick
45 (Assumes --force): Do a quick repack of all repos
46
47 --repack-all-full
48 (Assumes --force): Do a full repack of all repos
49
51 Locate fsck.conf and modify it to reflect your needs. The default con‐
52 figuration file is heavily commented.
53
54 Set up a cron job to run nightly for quick repacks, and weekly for fsck
55 checks:
56
57 # Make sure MAILTO is set, for error reports
58 MAILTO=root
59 # Run nightly repacks to optimize the repos
60 0 2 1-6 * * mirror /usr/bin/grok-fsck -c /etc/grokmirror/fsck.conf --repack-only
61 # Run weekly fsck checks on Sunday
62 0 2 0 * * mirror /usr/bin/grok-fsck -c /etc/grokmirror/fsck.conf
63
64 You can force a full run using the -f flag, but unless you only have a
65 few smallish git repositories, it's not recommended, as it may take
66 several hours to complete, as it will do a full repack, prune and fsck
67 of all repositories. To make this process faster, you can use:
68
69 · --connectivity: when doing fsck, only check object connectivity
70
71 · --repack-all-quick: do a quick repack of all repositories
72
73 · --repack-all-full: if you have extra_repack_flags_full defined in the
74 configuration file, trigger a full repack of every repository. This
75 can be handy if you need to bring up a newly cloned mirror and want
76 to make sure it's repacked and all bitmaps are built before serving
77 content.
78
80 · grok-manifest(1)
81
82 · grok-pull(1)
83
84 · git(1)
85
87 Please open an issue on Github:
88
89 https://github.com/mricon/grokmirror/issues
90
92 mricon@kernel.org
93
94 License: GPLv3+
95
97 The Linux Foundation and contributors
98
99
100
101
1021.2.0 2019-02-14 GROK-FSCK(1)