<?xml version="1.0" encoding="UTF-8"?>
<refentry id="dbd.1">
  <refmeta>
    <refentrytitle>dbd</refentrytitle>

    <manvolnum>1</manvolnum>

    <refmiscinfo class="date">12 Nov 2015</refmiscinfo>

    <refmiscinfo class="source">Netatalk</refmiscinfo>
    <refmiscinfo class="manual">Netatalk AFP Fileserver Manual</refmiscinfo>
    <refmiscinfo class="version">@netatalk_version@</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>dbd</refname>

    <refpurpose>CNID database maintenance</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>dbd</command>

      <arg>-cfFstuvV</arg>

      <arg><replaceable>volumepath</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>dbd</command>

      <arg>-V</arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>

    <para><command>dbd</command> scans all file and directories of AFP
    volumes, updating the CNID database of the volume. It must be run with
    appropriate permissions i.e. as root..</para>
  </refsect1>

  <refsect1>
    <title>Options</title>

    <variablelist>
      <varlistentry>
        <term>-c</term>

        <listitem>
          <para>convert from "<option>appledouble = v2</option>" to
          "<option>appledouble = ea</option>"</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-f</term>

        <listitem>
          <para>delete and recreate CNID database</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-F</term>

        <listitem>
          <para>location of the afp.conf config file</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-s</term>

        <listitem>
          <para>scan volume: treat the volume as read only and don't perform
          any filesystem modifications</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-t</term>

        <listitem>
          <para>show statistics while running</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-u</term>

        <listitem>
          <para>username for use with AFP volumes using user variable $u</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-v</term>

        <listitem>
          <para>verbose</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-V</term>

        <listitem>
          <para>display version info</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>CNID background</title>

    <para>The CNID backends maintains name to ID mappings. If you change a
    filename outside afpd(8) (shell, samba), the CNID database will not
    reflect that change. Netatalk tries to recover from such inconsistencies
    as gracefully as possible.</para>
  </refsect1>

  <refsect1>
    <title>See also</title>

    <para><citerefentry>
        <refentrytitle>cnid_metad</refentrytitle>

        <manvolnum>8</manvolnum>
      </citerefentry>, <citerefentry>
        <refentrytitle>cnid_dbd</refentrytitle>

        <manvolnum>8</manvolnum>
      </citerefentry></para>
  </refsect1>

  <refsect1>
      <title>Author</title>

      <para>See <ulink url='https://netatalk.io/contributors'>CONTRIBUTORS</ulink></para>
  </refsect1>
</refentry>
