| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 
 | 
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>7.1.1. grndb — Groonga v10.1.1-31-g1e46ba6 documentation</title>
    <link rel="stylesheet" href="../../_static/groonga.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
    <script src="../../_static/jquery.js"></script>
    <script src="../../_static/underscore.js"></script>
    <script src="../../_static/doctools.js"></script>
    <script src="../../_static/language_data.js"></script>
    
    <link rel="shortcut icon" href="../../_static/favicon.ico"/>
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="7.1.2. grnslap" href="grnslap.html" />
    <link rel="prev" title="7.1. Executables" href="../executables.html" /> 
  </head><body>
<div class="header">
  <h1 class="title">
    <a id="top-link" href="../../index.html">
      <span class="project">groonga</span>
      <span class="separator">-</span>
      <span class="description">An open-source fulltext search engine and column store.</span>
    </a>
  </h1>
  <div class="other-language-links">
    <ul>
      <li><a href="../../../../ja/html/reference/executables/grndb.html">日本語</a></li>
    </ul>
  </div>
</div>
  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="grnslap.html" title="7.1.2. grnslap"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="../executables.html" title="7.1. Executables"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../index.html">Groonga v10.1.1-31-g1e46ba6 documentation</a> »</li>
          <li class="nav-item nav-item-1"><a href="../../reference.html" ><span class="section-number">7. </span>Reference manual</a> »</li>
          <li class="nav-item nav-item-2"><a href="../executables.html" accesskey="U"><span class="section-number">7.1. </span>Executables</a> »</li>
        <li class="nav-item nav-item-this"><a href=""><span class="section-number">7.1.1. </span><code class="docutils literal notranslate"><span class="pre">grndb</span></code></a></li> 
      </ul>
    </div>  
    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="grndb">
<h1><span class="section-number">7.1.1. </span><code class="docutils literal notranslate"><span class="pre">grndb</span></code><a class="headerlink" href="#grndb" title="Permalink to this headline">¶</a></h1>
<div class="section" id="summary">
<h2><span class="section-number">7.1.1.1. </span>Summary<a class="headerlink" href="#summary" title="Permalink to this headline">¶</a></h2>
<div class="versionadded">
<p><span class="versionmodified added">New in version 4.0.9.</span></p>
</div>
<p><code class="docutils literal notranslate"><span class="pre">grndb</span></code> manages a Groonga database.</p>
<p>Here are features:</p>
<blockquote>
<div><ul class="simple">
<li><p>Checks whether database is broken or not.</p></li>
<li><p>Recovers broken database automatically if the database is
recoverable.</p></li>
</ul>
</div></blockquote>
</div>
<div class="section" id="syntax">
<h2><span class="section-number">7.1.1.2. </span>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<p><code class="docutils literal notranslate"><span class="pre">grndb</span></code> requires command and database path:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>grndb COMMAND [OPTIONS] DATABASE_PATH
</pre></div>
</div>
<p>Here are available commands:</p>
<blockquote>
<div><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">check</span></code> - Checks whether database is broken or not.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">recover</span></code> - Recovers database.</p></li>
</ul>
</div></blockquote>
</div>
<div class="section" id="usage">
<h2><span class="section-number">7.1.1.3. </span>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<p>Here is an example to check the database at <code class="docutils literal notranslate"><span class="pre">/var/lib/groonga/db/db</span></code>:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grndb check /var/lib/groonga/db/db
</pre></div>
</div>
<p>Here is an example to recover the database at <code class="docutils literal notranslate"><span class="pre">/var/lib/groonga/db/db</span></code>:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grndb recover /var/lib/groonga/db/db
</pre></div>
</div>
</div>
<div class="section" id="commands">
<h2><span class="section-number">7.1.1.4. </span>Commands<a class="headerlink" href="#commands" title="Permalink to this headline">¶</a></h2>
<p>This section describes available commands.</p>
<div class="section" id="check">
<h3><span class="section-number">7.1.1.4.1. </span><code class="docutils literal notranslate"><span class="pre">check</span></code><a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h3>
<p>It checks an existing Groonga database. If the database is broken,
<code class="docutils literal notranslate"><span class="pre">grndb</span></code> reports reasons and exits with non-<code class="docutils literal notranslate"><span class="pre">0</span></code> exit status.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You must not use this command for opened database. If the database
is opened, this command may report wrong result.</p>
</div>
<p><code class="docutils literal notranslate"><span class="pre">check</span></code> has some options.</p>
<div class="section" id="target">
<h4><span class="section-number">7.1.1.4.1.1. </span><code class="docutils literal notranslate"><span class="pre">--target</span></code><a class="headerlink" href="#target" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<p><span class="versionmodified added">New in version 5.1.2.</span></p>
</div>
<p>It specifies a check target object.</p>
<p>If your database is large and you know an unreliable object, this
option will help you. <code class="docutils literal notranslate"><span class="pre">check</span></code> need more time for large database. You
can reduce check time by <code class="docutils literal notranslate"><span class="pre">--target</span></code> option to reduce check target.</p>
<p>The check target is checked recursive. Because related objects of
unreliable object will be unreliable.</p>
<p>If the check target is a table, all columns of the table are also
checked recursive.</p>
<p>If the check target is a table and its key type is another table, the
another table is also checked recursive.</p>
<p>If the check target is a column and its value type is a table, the
table is also checked recursive.</p>
<p>If the check target is an index column, the table specified as value
type and all sources are also checked recursive.</p>
<p>Here is an example that checks only <code class="docutils literal notranslate"><span class="pre">Entries</span></code> table and its
columns:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grndb check --target Entries /var/lib/groonga/db/db
</pre></div>
</div>
<p>Here is an example that checks only <code class="docutils literal notranslate"><span class="pre">Entries.name</span></code> column:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grndb check --target Entries.name /var/lib/groonga/db/db
</pre></div>
</div>
</div>
<div class="section" id="log-level">
<h4><span class="section-number">7.1.1.4.1.2. </span><code class="docutils literal notranslate"><span class="pre">--log-level</span></code><a class="headerlink" href="#log-level" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<p><span class="versionmodified added">New in version 7.0.4.</span></p>
</div>
<p>It specifies a log level of <code class="docutils literal notranslate"><span class="pre">grndb</span></code> log.</p>
<p>Here is an example that specifies <code class="docutils literal notranslate"><span class="pre">--log-level</span></code> option:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grndb check --log-level info --log-path /var/log/groonga/grndb.log /var/lib/groonga/db/db
</pre></div>
</div>
<p>See <a class="reference internal" href="../commands/log_level.html"><span class="doc">log_level</span></a> to know about supported log level.</p>
</div>
<div class="section" id="log-path">
<h4><span class="section-number">7.1.1.4.1.3. </span><code class="docutils literal notranslate"><span class="pre">--log-path</span></code><a class="headerlink" href="#log-path" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<p><span class="versionmodified added">New in version 7.0.4.</span></p>
</div>
<p>It specifies a path of <code class="docutils literal notranslate"><span class="pre">grndb</span></code> log.</p>
<p>Here is an example that specifies <code class="docutils literal notranslate"><span class="pre">--log-path</span></code> option:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grndb check --log-path /var/log/groonga/grndb.log /var/lib/groonga/db/db
</pre></div>
</div>
</div>
<div class="section" id="log-flags">
<h4><span class="section-number">7.1.1.4.1.4. </span><code class="docutils literal notranslate"><span class="pre">--log-flags</span></code><a class="headerlink" href="#log-flags" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<p><span class="versionmodified added">New in version 9.0.3.</span></p>
</div>
<p>It specifies a logged content in <code class="docutils literal notranslate"><span class="pre">grndb</span></code> log by flags.
The default value of <code class="docutils literal notranslate"><span class="pre">--log-flags</span></code> is <code class="docutils literal notranslate"><span class="pre">time|message</span></code>. It means that timestamp and log messages are logged into <code class="docutils literal notranslate"><span class="pre">grndb</span></code> log.</p>
<p>Here is an example that specifies <code class="docutils literal notranslate"><span class="pre">--log-flags</span></code> option:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grndb check --log-path /var/log/groonga/grndb.log --log-flags "time|pid|message" /var/lib/groonga/db/db
</pre></div>
</div>
<p>See <a class="reference internal" href="groonga.html"><span class="doc">groonga executable file</span></a> to know about supported log flags.</p>
</div>
<div class="section" id="since">
<h4><span class="section-number">7.1.1.4.1.5. </span><code class="docutils literal notranslate"><span class="pre">--since</span></code><a class="headerlink" href="#since" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<p><span class="versionmodified added">New in version 9.0.4.</span></p>
</div>
<p>It specifies the object’s modified time which should be checked. If object’s modified time is newer than the specified time, these objects are checked by <code class="docutils literal notranslate"><span class="pre">grndb</span></code>.
You can specify the modified time as ISO 8601 format or <code class="docutils literal notranslate"><span class="pre">-NUNIT</span></code> format such as -3days or -2.5weeks format.</p>
<p>Here is an example that specifies <code class="docutils literal notranslate"><span class="pre">--since</span></code> option in ISO 8601 format:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grmdb check --since=2019-06-24T18:16:22 /var/lib/groonga/db/db
</pre></div>
</div>
<p>In above example, the objects which are modified after <code class="docutils literal notranslate"><span class="pre">2019-06-24T18:16:22</span></code> are checked.</p>
<p>Here is an example that specifies <code class="docutils literal notranslate"><span class="pre">--since</span></code> option in <code class="docutils literal notranslate"><span class="pre">-NUNIT</span></code> format:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grmdb check --since=-7d /var/lib/groonga/db/db
</pre></div>
</div>
<p>In above example, the objects which are modified in recent 7 days are checked.</p>
<p><code class="docutils literal notranslate"><span class="pre">-NUNIT</span></code> accepts the following suffix as a unit.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Supported suffix</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">s</span></code>, <code class="docutils literal notranslate"><span class="pre">sec</span></code>, <code class="docutils literal notranslate"><span class="pre">secs</span></code>, <code class="docutils literal notranslate"><span class="pre">second</span></code>, <code class="docutils literal notranslate"><span class="pre">seconds</span></code></p></td>
<td><p>Specify recent N seconds. For example, <code class="docutils literal notranslate"><span class="pre">--since=-100s</span></code> means within recent 100 seconds should be checked.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">m</span></code>, <code class="docutils literal notranslate"><span class="pre">min</span></code>, <code class="docutils literal notranslate"><span class="pre">mins</span></code>, <code class="docutils literal notranslate"><span class="pre">minute</span></code>, <code class="docutils literal notranslate"><span class="pre">minutes</span></code></p></td>
<td><p>Specify recent N minutes. For example, <code class="docutils literal notranslate"><span class="pre">--since=-10m</span></code> means within recent 10 minutes should be checked.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">h</span></code>, <code class="docutils literal notranslate"><span class="pre">hour</span></code>, <code class="docutils literal notranslate"><span class="pre">hours</span></code></p></td>
<td><p>Specify recent N hours. For example, <code class="docutils literal notranslate"><span class="pre">--since=-10h</span></code> means within recent 10 hours should be checked.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">d</span></code>, <code class="docutils literal notranslate"><span class="pre">day</span></code>, <code class="docutils literal notranslate"><span class="pre">days</span></code></p></td>
<td><p>Specify recent N days. For example, <code class="docutils literal notranslate"><span class="pre">--since=-10d</span></code> means within recent 10 days should be checked.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">w</span></code>, <code class="docutils literal notranslate"><span class="pre">week</span></code>, <code class="docutils literal notranslate"><span class="pre">weeks</span></code></p></td>
<td><p>Specify recent N weeks. For example, <code class="docutils literal notranslate"><span class="pre">--since=-10w</span></code> means within recent 10 weeks should be checked.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">month</span></code>, <code class="docutils literal notranslate"><span class="pre">months</span></code></p></td>
<td><p>Specify recent N months. For example, <code class="docutils literal notranslate"><span class="pre">--since=-10month</span></code> means within recent 10 months should be checked.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">year</span></code>, <code class="docutils literal notranslate"><span class="pre">years</span></code></p></td>
<td><p>Specify recent N years. For example, <code class="docutils literal notranslate"><span class="pre">--since=-1year</span></code> means within recent 1 year should be checked.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="recover">
<h3><span class="section-number">7.1.1.4.2. </span><code class="docutils literal notranslate"><span class="pre">recover</span></code><a class="headerlink" href="#recover" title="Permalink to this headline">¶</a></h3>
<p>It recovers an existing broken Groonga database.</p>
<p>If the database is not broken, <code class="docutils literal notranslate"><span class="pre">grndb</span></code> does nothing and exits with
<code class="docutils literal notranslate"><span class="pre">0</span></code> exit status.</p>
<p>If the database is broken and one or more index columns are only
broken, <code class="docutils literal notranslate"><span class="pre">grndb</span></code> recovers these index columns and exists with <code class="docutils literal notranslate"><span class="pre">0</span></code>
exit status. It may take a long time for large indexed data.</p>
<p>If the database is broken and tables or data columns are broken,
<code class="docutils literal notranslate"><span class="pre">grndb</span></code> reports broken reasons and exits with non-<code class="docutils literal notranslate"><span class="pre">0</span></code> exit
status. You can know whether the database is recoverable or not by
<code class="docutils literal notranslate"><span class="pre">check</span></code> command.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You must not use this command for opened database. If the database
is opened, this command may break the database.</p>
</div>
<p><code class="docutils literal notranslate"><span class="pre">recover</span></code> has some options.</p>
<div class="section" id="force-truncate">
<span id="grndb-force-truncate"></span><h4><span class="section-number">7.1.1.4.2.1. </span><code class="docutils literal notranslate"><span class="pre">--force-truncate</span></code><a class="headerlink" href="#force-truncate" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<p><span class="versionmodified added">New in version 7.0.4.</span></p>
</div>
<p>It forces to truncate a corrupted database object.</p>
<p>Here is an example that specifies <code class="docutils literal notranslate"><span class="pre">--force-truncate</span></code> option:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grndb recover --force-truncate --log-level info --log-path /var/log/groonga/grndb.log /var/lib/groonga/db/db
</pre></div>
</div>
<p>When this option is specified, <code class="docutils literal notranslate"><span class="pre">grndb</span></code> does the followings:</p>
<ul class="simple">
<li><p>check whether there is a corrupted database object (table, column, indexes)</p></li>
<li><p>truncate a corrupted database object (table, column, indexes)</p></li>
<li><p>remove incremental files with .00N suffix which is created when large amount of data is loaded</p></li>
</ul>
<p><code class="docutils literal notranslate"><span class="pre">--force-truncate</span></code> option is destructive one. Even though lock is still remained, <code class="docutils literal notranslate"><span class="pre">grndb</span></code> truncates a targeted corrupted database object.</p>
<p>After <code class="docutils literal notranslate"><span class="pre">grndb</span> <span class="pre">recover</span></code> command has finished, you need to load data
against truncated tables or columns to recreate database.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You must use this option only when necessary. It means that you use it when there is a mismatch between database meta information and database object files which exists actually. This options should be used when there is no other way to recover database.</p>
</div>
</div>
<div class="section" id="force-lock-clear">
<span id="grndb-force-lock-clear"></span><h4><span class="section-number">7.1.1.4.2.2. </span><code class="docutils literal notranslate"><span class="pre">--force-lock-clear</span></code><a class="headerlink" href="#force-lock-clear" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<p><span class="versionmodified added">New in version 7.1.1.</span></p>
</div>
<p>It forces to clear lock of database, table and data column. It doesn’t
clear lock of index column. If index column has lock, the index column
is recreated instead of clearing lock.</p>
<p>Normally, you should truncate and load data again instead of just
clearing lock. Because objects that have lock may be broken. This
option is provided only for users who know the risk that “the database
may be broken but I want to keep using it”.</p>
<p>Here is an example that specifies <code class="docutils literal notranslate"><span class="pre">--force-lock-clear</span></code> option:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grndb recover --force-lock-clear --log-level info --log-path /var/log/groonga/grndb.log /var/lib/groonga/db/db
</pre></div>
</div>
<p>When this option is specified, <code class="docutils literal notranslate"><span class="pre">grndb</span></code> does the followings:</p>
<ul class="simple">
<li><p>check whether there are database, table or data column that have lock</p></li>
<li><p>clear lock of these objects</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You must use this option only when necessary. Because your database
may not be recovered. The database that has objects that have lock
may be broken or not be broken. You can keep using the database but
Groonga may crash if the database is broken.</p>
</div>
</div>
<div class="section" id="id1">
<h4><span class="section-number">7.1.1.4.2.3. </span><code class="docutils literal notranslate"><span class="pre">--log-level</span></code><a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<p><span class="versionmodified added">New in version 7.0.4.</span></p>
</div>
<p>It specifies a log level of <code class="docutils literal notranslate"><span class="pre">grndb</span></code> log.</p>
<p>Here is an example that specifies <code class="docutils literal notranslate"><span class="pre">--log-level</span></code> option:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grndb recover --log-level info --log-path /var/log/groonga/grndb.log /var/lib/groonga/db/db
</pre></div>
</div>
<p>See <a class="reference internal" href="../commands/log_level.html"><span class="doc">log_level</span></a> to know about supported log level.</p>
</div>
<div class="section" id="id2">
<h4><span class="section-number">7.1.1.4.2.4. </span><code class="docutils literal notranslate"><span class="pre">--log-path</span></code><a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<p><span class="versionmodified added">New in version 7.0.4.</span></p>
</div>
<p>It specifies a path of <code class="docutils literal notranslate"><span class="pre">grndb</span></code> log.</p>
<p>Here is an example that specifies <code class="docutils literal notranslate"><span class="pre">--log-path</span></code> option:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grndb recover --log-path /var/log/groonga/grndb.log /var/lib/groonga/db/db
</pre></div>
</div>
</div>
<div class="section" id="id3">
<h4><span class="section-number">7.1.1.4.2.5. </span><code class="docutils literal notranslate"><span class="pre">--log-flags</span></code><a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h4>
<div class="versionadded">
<p><span class="versionmodified added">New in version 9.0.2.</span></p>
</div>
<p>It specifies a logged content in <code class="docutils literal notranslate"><span class="pre">grndb</span></code> log by flags.
The default value of <code class="docutils literal notranslate"><span class="pre">--log-flags</span></code> is <code class="docutils literal notranslate"><span class="pre">time|message</span></code>. It means that timestamp and log messages are logged into <code class="docutils literal notranslate"><span class="pre">grndb</span></code> log.</p>
<p>Here is an example that specifies <code class="docutils literal notranslate"><span class="pre">--log-flags</span></code> option:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>% grndb check --log-path /var/log/groonga/grndb.log --log-flags "time|pid|message" /var/lib/groonga/db/db
</pre></div>
</div>
<p>See <a class="reference internal" href="groonga.html"><span class="doc">groonga executable file</span></a> to know about supported log flags.</p>
</div>
</div>
</div>
</div>
            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">7.1.1. <code class="docutils literal notranslate"><span class="pre">grndb</span></code></a><ul>
<li><a class="reference internal" href="#summary">7.1.1.1. Summary</a></li>
<li><a class="reference internal" href="#syntax">7.1.1.2. Syntax</a></li>
<li><a class="reference internal" href="#usage">7.1.1.3. Usage</a></li>
<li><a class="reference internal" href="#commands">7.1.1.4. Commands</a><ul>
<li><a class="reference internal" href="#check">7.1.1.4.1. <code class="docutils literal notranslate"><span class="pre">check</span></code></a><ul>
<li><a class="reference internal" href="#target">7.1.1.4.1.1. <code class="docutils literal notranslate"><span class="pre">--target</span></code></a></li>
<li><a class="reference internal" href="#log-level">7.1.1.4.1.2. <code class="docutils literal notranslate"><span class="pre">--log-level</span></code></a></li>
<li><a class="reference internal" href="#log-path">7.1.1.4.1.3. <code class="docutils literal notranslate"><span class="pre">--log-path</span></code></a></li>
<li><a class="reference internal" href="#log-flags">7.1.1.4.1.4. <code class="docutils literal notranslate"><span class="pre">--log-flags</span></code></a></li>
<li><a class="reference internal" href="#since">7.1.1.4.1.5. <code class="docutils literal notranslate"><span class="pre">--since</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#recover">7.1.1.4.2. <code class="docutils literal notranslate"><span class="pre">recover</span></code></a><ul>
<li><a class="reference internal" href="#force-truncate">7.1.1.4.2.1. <code class="docutils literal notranslate"><span class="pre">--force-truncate</span></code></a></li>
<li><a class="reference internal" href="#force-lock-clear">7.1.1.4.2.2. <code class="docutils literal notranslate"><span class="pre">--force-lock-clear</span></code></a></li>
<li><a class="reference internal" href="#id1">7.1.1.4.2.3. <code class="docutils literal notranslate"><span class="pre">--log-level</span></code></a></li>
<li><a class="reference internal" href="#id2">7.1.1.4.2.4. <code class="docutils literal notranslate"><span class="pre">--log-path</span></code></a></li>
<li><a class="reference internal" href="#id3">7.1.1.4.2.5. <code class="docutils literal notranslate"><span class="pre">--log-flags</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
  <h4>Previous topic</h4>
  <p class="topless"><a href="../executables.html"
                        title="previous chapter"><span class="section-number">7.1. </span>Executables</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="grnslap.html"
                        title="next chapter"><span class="section-number">7.1.2. </span>grnslap</a></p>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="grnslap.html" title="7.1.2. grnslap"
             >next</a> |</li>
        <li class="right" >
          <a href="../executables.html" title="7.1. Executables"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../index.html">Groonga v10.1.1-31-g1e46ba6 documentation</a> »</li>
          <li class="nav-item nav-item-1"><a href="../../reference.html" ><span class="section-number">7. </span>Reference manual</a> »</li>
          <li class="nav-item nav-item-2"><a href="../executables.html" ><span class="section-number">7.1. </span>Executables</a> »</li>
        <li class="nav-item nav-item-this"><a href=""><span class="section-number">7.1.1. </span><code class="docutils literal notranslate"><span class="pre">grndb</span></code></a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        © Copyright 2009-2021, Brazil, Inc.
    </div>
  </body>
</html>
 |