--- /dev/null
+'\" t
+.\" Title: dbd
+.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.74.3 <http://docbook.sf.net/>
+.\" Date: 26 May 2009
+.\" Manual: Netatalk
+.\" Source: Netatalk
+.\" Language: English
+.\"
+.TH "DBD" "1" "26 May 2009" "2.1dev" "Netatalk"
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+dbd \- CNID database maintanance
+.SH "SYNOPSIS"
+.HP \w'\fBdbd\fR\fB\fR\ 'u
+\fBdbd\fR\fB\fR [\-evx] \-d\ [\-i] | \-s | \-r\ [\-f] \fIvolumepath\fR
+.SH "DESCRIPTION"
+.PP
+\fBdbd\fR
+can dump, scan, reindex and rebuild
+\fINetatalk\fR
+dbd CNID databases\&. It must be run with appropiate permissions i\&.e\&. as root\&.
+.SH "COMMANDS"
+.PP
+\-d
+.RS 4
+Dump CNID database\&. With
+\fB\-i \fRdump indexes too\&.
+.RE
+.PP
+\-s
+.RS 4
+Scan volume:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Compare CNIDs in database with volume
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Test if AppleDouble directories exist
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Test if AppleDouble files exist
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Report orphaned AppleDouble files
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Report directories inside AppleDouble directories
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Check name encoding by roundtripping, log on error
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Check for orphaned CNIDs in database (requires
+\fB\-e\fR)
+.RE
+.RE
+.PP
+\-r
+.RS 4
+Rebuild volume\&. With
+\fB\-f\fR
+wipe database and rebuild from CNIIDs stored in AppleDouble files, only available for volumes with \'cachecnid\' option\&. Implies
+\fB\-e\fR\&.
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Sync CNIDSs from database with volume
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Ensure AppleDouble directories exist
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Ensure AppleDouble files exist
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Delete orphaned AppleDouble files
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Report directories inside AppleDouble directories
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Check name encoding by roundtripping, log on error
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Delete orphaned CNIDs in database (requires
+\fB\-e\fR)
+.RE
+.RE
+.SH "OPTIONS"
+.PP
+\-e
+.RS 4
+Only work on inactive volumes and lock them (exclusive)
+.RE
+.PP
+\-x
+.RS 4
+Rebuild indexes (just for completeness, mostly useless!)
+.RE
+.PP
+\-v
+.RS 4
+verbose
+.RE
+.SH "WARNING"
+.PP
+If you want/need to run an \-r \-f rebuild after adding \'cachecnid\' to a volume configuration, you must run a rebuild with \-r alone at first in order to sync all existing CNIDs from the db to the AppleDouble files!
+.SH "CNID BACKGROUND"
+.PP
+The CNID backends maintains name to ID mappings\&. If you change a filename outside afpd(8) (shell, samba), the CNID db will not know and doesn\'t reflect that change\&. Netatalk tries to recover from such inconsistencies as gracefully as possible\&. The mechanisms to resolve such inconsistencies may fail sometimes, though, as this is not an easy task to accomplish\&. E\&.g\&. if several names in the path to the file or directory have changed, things may go wrong\&.
+.PP
+If you change a lot of filenames at once, chances are higher that the afpds fallback mechanisms fail, i\&.e\&. files will be assigned new IDs, even though the file hasn\'t changed\&.
+.SH "SEE ALSO"
+.PP
+\fBcnid_metad\fR(8),
+\fBcnid_dbd\fR(8)